diff --git a/R/analysis/lmer.output-fun.R b/R/analysis/lmer.output-fun.R
index fd3a33e3ece0cfb87befb64b8361bf451e969d64..3b5c98bb114447c0a59cc78eab9eafcb4d5d07ee 100644
--- a/R/analysis/lmer.output-fun.R
+++ b/R/analysis/lmer.output-fun.R
@@ -254,9 +254,8 @@ quant.data <-
 
 trait.quant <-fun.std.quant.trait(trait, dat.q = quant.data
        , dat.sd = sd.traits)
-
-seq.BATOT <- seq(from = quant.data[['ql.BATOT']],
-                 to = quant.data[['ql.BATOT']],
+seq.BATOT <- seq(from = 0,
+                 to = quant.data[['qh.BATOT']],
                  length.out = N.pred)
 return(list(trait.quant, seq.BATOT))
 }
@@ -273,7 +272,6 @@ fun.generate.pred.dat <-  function(type, list.sd, Tf.low, Tf.high, seq.sumBn){
     sd_sumTnBn <- list.sd$sd.sumTnBn
     sd_sumTnTfBn.abs <- list.sd$sd.sumTnTfBn.abs
 
-
 d1.l <- data.frame('logG' =  rep(0 , length(seq.sumBn)),
                   'logD' = rep(D.mean, length(seq.sumBn)),
                   'Tf' = rep(Tf.low, length(seq.sumBn)),
@@ -352,18 +350,61 @@ new.data <- switch(type,
 return(new.data)
 }
 
+
+## BOLKER FUNCTION FROM RPUB
+easyPredCI <- function(list.res, newdata, alpha=0.05) {
+    beta <- list.res$lmer.summary$fixed.coeff.E
+    V <- list.res$vcov
+    form <- formula(list.res$terms)
+    ## fixed-effects model matrix for new data
+    X <- model.matrix(form,
+                   newdata)
+    pred <- X %*% beta
+    pred.se <- sqrt(diag(X %*% V %*% t(X))) ## std errors of predictions
+    ## inverse-link (logistic) function: could also use plogis()
+    ## construct 95% Normal CIs on the link scale and
+    ##  transform back to the response (probability) scale:
+    crit <- -qnorm(alpha/2)
+    cbind(newdata,
+          pred = pred,
+          lwr = pred-crit*pred.se,
+          upr = pred+crit*pred.se)
+}
+
+
 ## predict for one traits
-predict.for.one.traits <- function(trait, type, dir.root, list.res, alpha = 0.05){
+predict.for.one.traits <- function(trait, type,
+                                   dir.root, list.res,
+                                   alpha = 0.05){
 list.var <- get.predict.var.scaled(trait, dir.root)
 new.data <- fun.generate.pred.dat(type, list.sd = list.res$list.sd,
                                   Tf.low = list.var[[1]][['ql']],
                                   Tf.high = list.var[[1]][['qh']],
                                   seq.sumBn = list.var[[2]])
 pred.res <- easyPredCI(list.res, new.data, alpha)
+pred.res <- expo.BA.G.all(pred.res, list.res$list.sd)
 pred.res$sumBn <-  pred.res$sumBn*list.res$list.sd$sd.sumBn
 return(pred.res)
 }
 
+# turn pred log(BA.G) in BA.G
+inv.link.BA.G <-  function(pred, sd.BA.G, mean.BA.G, min.BA.G = 100){
+return(exp(pred * sd.BA.G + mean.BA.G) - min.BA.G -1)
+}
+
+expo.BA.G.all <- function(pred.res, list.sd){
+pred.res$pred <- inv.link.BA.G(pred.res$pred,
+                               sd.BA.G = list.sd$sd.logG,
+                               mean.BA.G = list.sd$mean.logG)
+pred.res$lwr <- inv.link.BA.G(pred.res$lwr,
+                               sd.BA.G = list.sd$sd.logG,
+                               mean.BA.G = list.sd$mean.logG)
+pred.res$upr <- inv.link.BA.G(pred.res$upr,
+                               sd.BA.G = list.sd$sd.logG,
+                               mean.BA.G = list.sd$mean.logG)
+return(pred.res)
+}
+
 ## FUNCTION TO get in MATRIX shape FROM MATRIX
 turn.pred.in.mat <- function(data.pred, predicted, var = 'mean'){
  Tf <- unique(data.pred$Tf)
@@ -383,6 +424,7 @@ mat.pred <- turn.pred.in.mat(new.data, pred.res)
 return(mat.pred)
 }
 
+
 ## fun to pred in function of BA
 fun.pred.BA.l.and.h <- function(trait, type, dir.root, list.res){
 pred.l <- predict.for.one.traits(trait,
@@ -409,10 +451,11 @@ for (i in traits){
     list.df[[i]] <- fun.pred.BA.l.and.h(i, type, dir.root, list.temp)
     }
 dat.res <- data.frame(do.call('rbind', list.df),
-           traits = rep(traits, each = N.pred))
+           traits = rep(traits, each = 2*N.pred))
 return(dat.res)
 }
 
+
 theme_simple <-  function(){
   theme_bw() +
   theme(
@@ -431,43 +474,24 @@ theme_simple <-  function(){
 plot.growth.ba <- function(traits, model, type, dir.root, list.res.all,
                            var.x = 'sumBn', var.y = 'pred',
                            var.l = 'lwr', var.h = 'upr', var.quant = 'quant',
-                           xlab_p = expression(paste("Basal Area ",(m^{2} ~~ ha[-1]))),
-                           ylab_p = expression(paste("Basal Area growth",
+                           xlab_p = expression(paste("Basal area ",(m^{2} ~~ ha[-1]))),
+                           ylab_p = expression(paste("Basal area growth",
                                                      (m^{2} ~~ yr[-1])))){
 
-
+require(RColorBrewer)
+require(ggplot2)
 DF <- fun.pred.BA.l.and.h.all.traits(traits, model, type, dir.root, list.res.all, N.pred = 100)
 cols <- brewer.pal(3,"Dark2")[c(1,2)]
-
 ggplot(DF, aes_string(x = var.x, y = var.y, colour = var.quant)) +
   geom_line(aes_string(x = var.x, y = var.y, colour = var.quant)) + scale_color_manual(values = cols) +
   geom_ribbon(aes_string(ymin=var.l, ymax=var.h,
                   fill = var.quant, linetype=NA, show_guide=FALSE), alpha=0.2) +
   scale_fill_manual(values = cols)  +
-  facet_wrap( ~ trait, ncol=2) +  theme_simple() + guides(colour=FALSE)+
+  facet_wrap( ~ traits, ncol=2) +  theme_simple() + guides(colour=FALSE)+
   ylab(ylab_p)+xlab(xlab_p)
 
 }
 
-## BOLKER FUNCTION FROM RPUB
-easyPredCI <- function(list.res, newdata, alpha=0.05) {
-    beta <- list.res$lmer.summary$fixed.coeff.E
-    V <- list.res$vcovlmer.summary$fixed.coeff.E
-    form <- formula(list.res$terms)
-    ## fixed-effects model matrix for new data
-    X <- model.matrix(form,
-                   newdata)
-    pred <- X %*% beta
-    pred.se <- sqrt(diag(X %*% V %*% t(X))) ## std errors of predictions
-    ## inverse-link (logistic) function: could also use plogis()
-    ## construct 95% Normal CIs on the link scale and
-    ##  transform back to the response (probability) scale:
-    crit <- -qnorm(alpha/2)
-    cbind(newdata,
-          mean = pred,
-          lwr = pred0-crit*pred.se,
-          upr = pred0+crit*pred.se)
-}
 
 
 
@@ -860,15 +884,13 @@ format.all.output.lmer <- function(file.name,
                                list.file.name,
                                models,
                                traits = c("SLA", "Wood.density", "Max.height",
-                                          "Leaf.N", "Seed.mass"),
-                               type.filling = 'species'){
+                                          "Leaf.N", "Seed.mass")){
 files <-  c()
 for (trait in traits){
     for(model in models){
        source(model, local = TRUE)
        model.obj <- load.model()
-       pathout <- output.dir('lmer', model.obj$name, trait, 'all.no.log',
-                                type.filling=type.filling)
+       pathout <- output.dir('lmer', model.obj$name, trait, 'all.no.log')
        files <- c(files,file.path(pathout,file.name))
       }
     }
diff --git a/R/analysis/lmer.run.R b/R/analysis/lmer.run.R
index 88a965fddd55d29a324ca12e4e326fc1f8a245fc..76a9d01e303f50409d6635cb81756680d73bddca 100644
--- a/R/analysis/lmer.run.R
+++ b/R/analysis/lmer.run.R
@@ -6,22 +6,23 @@ library(lme4)
 
 
 run.multiple.model.for.set.one.trait <- function(model.files, fun.model, trait,
-                                                 type.filling, cat.TF = FALSE,
+                                                 cat.TF = FALSE,
                                                  fname  = 'data.all.no.log.rds',
                                                  ...){
   for (m in model.files)
     (run.model.for.set.one.trait (m, fun.model, trait,
-                                  type.filling = type.filling, cat.TF = cat.TF,
+                                  cat.TF = cat.TF,
                                   fname, ...))
 }
 
 
 
 run.model.for.set.one.trait <- function(model.file, fun.model, trait,
-                                        type.filling, cat.TF, fname, ...){
+                                        cat.TF, fname, ...){
     fun.model <- match.fun(fun.model)
-    try(fun.model(model.file, trait,  type.filling = type.filling,
-                  cat.TF = cat.TF, fname = fname, ...))
+    try(fun.model(model.file, trait,  
+                  cat.TF = cat.TF,
+                  fname = fname, ...))
 
 }
 
@@ -64,7 +65,7 @@ fun.call.lmer.and.save <- function(formula, df.lmer, path.out,
 
 run.lmer <- function (model.file, trait,
                       min.obs = 10, sample.size = NA,
-                      type.filling, cat.TF, fname = 'data.all.no.log.rds',
+                      cat.TF, fname = 'data.all.no.log.rds',
                       var.sample = 'ecocode',
                       select.biome = NA,
                       merge.biomes.TF = TRUE) {
@@ -74,8 +75,7 @@ run.lmer <- function (model.file, trait,
     #= Path for output
     if(fname == 'data.all.no.log.rds') dir <- 'all.no.log'
     if(fname == 'data.all.log.rds') dir <- 'all.log'
-    path.out <- output.dir('lmer', model$name, trait, dir,
-                           type.filling = type.filling)
+    path.out <- output.dir('lmer', model$name, trait, dir)
     print(path.out)
     dir.create(path.out, recursive = TRUE, showWarnings = FALSE)
     cat("run lmer for model", model.file, " for trait",
@@ -104,8 +104,8 @@ run.lmer <- function (model.file, trait,
 
 #========================================================================
 
-output.dir <- function (type , model, trait, set, type.filling) {
-  file.path("output", type, set, trait, type.filling, model)
+output.dir <- function (type , model, trait, set) {
+  file.path("output", type, set, trait,  model)
 }
 
 
@@ -184,12 +184,10 @@ load.data.for.lmer <- function(trait, cat.TF,
    }
   }else{
  }
-  list.sd <- fun.get.sd.lmer(df, trait, min.obs = 10,
-                    type.filling = type.filling)
+  list.sd <- fun.get.sd.lmer(df, trait, min.obs = 10)
 
   res <- fun.format.data.for.lmer(df, trait,
-                                     type.filling = type.filling,
-                                     cat.TF = cat.TF)
+                                  cat.TF = cat.TF)
 return( list(res, list.sd))
 }
 
@@ -205,12 +203,10 @@ return(data)
 
 load.and.save.data.for.lmer <- function(trait,
                                         min.obs= 10,
-                                        type.filling = 'species',
                                         fname = 'data.all.no.log.rds',
                                         base.dir = "output/processed"){
 data.tree.tot <- readRDS(file.path(base.dir, fname))
-df <- fun.select.data.for.lmer(data.tree.tot, trait,
-                        type.filling = type.filling)
+df <- fun.select.data.for.lmer(data.tree.tot, trait)
 if (fname == 'data.all.no.log.rds') type <- 'no.log'
 if (fname == 'data.all.log.rds') type <- 'log'
 saveRDS(df,file = file.path(base.dir,paste('data', trait, type, 'rds',
@@ -382,8 +378,7 @@ data.frame(logG =  logG,
 # Function to prepare data for lmer with new CWM data
 # that will be used in a simple linear model
 #============================================================
-fun.select.data.for.lmer <-  function(data.tree, trait, min.obs = 10,
-                                      type.filling = 'species') {
+fun.select.data.for.lmer <-  function(data.tree, trait, min.obs = 10) {
 if(! trait %in%  c("SLA", "Leaf.N", "Seed.mass",
                    "SLA", "Wood.density", "Max.height"))
     stop("need trait to be in SLA Leaf.N Seed.mass
@@ -410,7 +405,7 @@ data.tree <- fun.select.data.for.analysis(data.tree,
 # that will be used in a simple linear model
 #============================================================
 fun.format.data.for.lmer <-  function(data.tree, trait, min.obs = 10,
-                               type.filling = 'species', cat.TF) {
+                                      cat.TF) {
 if(! trait %in%  c("SLA", "Leaf.N", "Seed.mass",
                    "SLA", "Wood.density", "Max.height"))
     stop("need trait to be in SLA Leaf.N Seed.mass
@@ -441,8 +436,7 @@ if(cat.TF) {
 }
 
 
-fun.get.sd.lmer <-  function(data.tree, trait, min.obs = 10,
-                               type.filling = 'species') {
+fun.get.sd.lmer <-  function(data.tree, trait, min.obs = 10) {
 if(! trait %in%  c("SLA", "Leaf.N", "Seed.mass",
                    "SLA", "Wood.density", "Max.height"))
     stop("need trait to be in SLA Leaf.N Seed.mass
diff --git a/R/analysis/stan.run.R b/R/analysis/stan.run.R
index e6bbb922b863e0aea3d0864b0913ef77f1744cb7..10d74112ae4525f179589fbbd7c06e9649983e37 100644
--- a/R/analysis/stan.run.R
+++ b/R/analysis/stan.run.R
@@ -77,7 +77,7 @@ return(stan.output)
 
 run.stan <- function (model.file, trait, init.TF,
                       min.obs = 10, sample.size = NA,
-                      type.filling='species', cat.TF,
+                      cat.TF,
                       fname = 'data.all.no.log.rds',
                       var.sample = 'ecocode.id', chain_id ,
                       parallel.TF = TRUE, select.biome = NA,
@@ -91,8 +91,7 @@ run.stan <- function (model.file, trait, init.TF,
     if(fname == 'data.all.log.rds') dir <- 'all.log'
 
     path.out <- output.dir(type = 'stan', model = model$name,
-                           trait = trait, set = dir,
-                           type.filling = type.filling)
+                           trait = trait, set = dir)
     print(path.out)
     dir.create(path.out, recursive = TRUE, showWarnings = FALSE)
     cat("run stan for model", model.file, " for trait",
diff --git a/R/process.data/process-fun.R b/R/process.data/process-fun.R
index e11a6c4e2f7803392a61382ce9ac6c8fc8cba332..19728e2e89fb28231bc2c63be5f93196f6f31e69 100644
--- a/R/process.data/process-fun.R
+++ b/R/process.data/process-fun.R
@@ -771,6 +771,16 @@ fun.reformat.trait <- function(data,trait){
                                  sep = '')))
   data[, c(trait.CWM.sd.n) := eval(trait.CWM.sd.e) ]
 
+    ##
+  trait.abs.CWM.sd.n <-  paste(trait, 'abs.CWM.fill', sep = '.')
+##
+  trait.abs.CWM.sd.e <- (parse(text =
+                           paste('(',trait,'.abs.CWM.fill',
+                                 ')/sd(',trait,
+                                 '.focal, na.rm =TRUE)' ,
+                                 sep = '')))
+  data[, c(trait.abs.CWM.sd.n) := eval(trait.abs.CWM.sd.e) ]
+
 ##
   trait.focal.sd.n <-  paste(trait, 'focal', sep = '.')
 ##
@@ -782,15 +792,6 @@ fun.reformat.trait <- function(data,trait){
                                  sep = '')))
   data[, c(trait.focal.sd.n) := eval(trait.focal.sd.e) ]
   
-  ##
-  trait.abs.CWM.sd.n <-  paste(trait, 'abs.CWM.fill', sep = '.')
-##
-  trait.abs.CWM.sd.e <- (parse(text =
-                           paste('(',trait,'.abs.CWM.fill',
-                                 ')/sd(',trait,
-                                 '.focal, na.rm =TRUE)' ,
-                                 sep = '')))
-  data[, c(trait.abs.CWM.sd.n) := eval(trait.abs.CWM.sd.e) ]
 return(data)
 }
 
diff --git a/data/metadata/sites/sites_description.csv b/data/metadata/sites/sites_description.csv
new file mode 100644
index 0000000000000000000000000000000000000000..3ca2c56108faad6e2f7bb6832538908284d413d5
--- /dev/null
+++ b/data/metadata/sites/sites_description.csv
@@ -0,0 +1 @@
+data set names,Country,plot_size,dbh_threshold,# plot,References,Traits
NSW,Australia,25-30 to 20*60,10cm?,30,,"Wood density, Maximum height, and Seed mass"
Panama,Panama,1ha to 50ha,1,42,,"Wood density, SLA,  Maximum height, and Seed mass"
Japan,Japan,0.35ha to 1.05ha,3cm ???,16,,"Wood density, SLA,  Maximum height, and Seed mass"
Luquillo,Puerto Rico,16ha,1cm,1,,"Wood density, SLA,  Maximum height, and Seed mass"
M'Ba•ki,Central African Republic,4ha,10cm,10,,"Wood density, SLA,  and Seed mass"
Fushan,Taiwan,25ha,1cm,1,,"Wood density, SLA,  Maximum height, and Seed mass"
Paracou,French Guiana,6.25ha,10cm,15,,
France,France,0.017h to 0.07ha,7.5,41503,,"Wood density, SLA,  Maximum height, and Seed mass"
Spain,Spain,0.0078ha to 0.19ha,7.5,49855,,"Wood density, SLA,  Maximum height, and Seed mass"
Swiss,Swistzerland,0.02ha to 0.05ha,12,2665,,"Wood density, SLA,  Maximum height, and Seed mass"
Sweden,Sweden,0.0019ha to 0.0314ha,5cm,22904,,"Wood density, SLA,  Maximum height, and Seed mass"
US,USA,,,,,"Wood density, SLA,  Maximum height, and Seed mass"
Canada,Canada,,,,,"Wood density, SLA,  Maximum height, and Seed mass"
NVS,New Zealand,,,,,"Wood density, SLA,  Maximum height, and Seed mass"
\ No newline at end of file
diff --git a/docs/paper/Makefile b/docs/paper/Makefile
index 8b0fa25f07c31ab99d1b5c0868c86d03ee415e62..4217dbe330f55be62828e9d6bcf280290041eadd 100644
--- a/docs/paper/Makefile
+++ b/docs/paper/Makefile
@@ -1,11 +1,24 @@
 TARGETS = $(subst md,pdf,$(shell ls *.md))
 
-all: narrative.pdf
+all: paper.pdf extended_methods.pdf extended_data.pdf
 
-narrative.pdf: narrative.md include.tex refs.bib
+paper.pdf: paper.md include.tex refs.bib
 	pandoc $<  --csl=nature.csl --filter pandoc-citeproc --bibliography=refs.bib --template=include.tex --variable mainfont="Times New Roman" --variable sansfont=Arial --variable fontsize=12pt --latex-engine=xelatex -o $@
 
+extended_methods.pdf: extended_methods.md include.tex refs.bib
+	pandoc $<  --csl=nature.csl --filter pandoc-citeproc --bibliography=refs.bib --template=include.tex --variable mainfont="Times New Roman" --variable sansfont=Arial --variable fontsize=12pt --latex-engine=xelatex -o $@
+
+extended_data.md: extended_data.R
+	Rscript  -e "library(sowsear); sowsear('extended_data.R', 'Rmd')"
+	Rscript  -e "library(knitr);  knit('extended_data.Rmd', output = 'extended_data.md')"
+
+extended_data.pdf: extended_data.md include.tex refs.bib
+	pandoc $<  --csl=nature.csl --filter pandoc-citeproc --bibliography=refs.bib --standalone --template=include.tex --variable mainfont="Times New Roman" --variable sansfont=Arial --variable fontsize=12pt --latex-engine=xelatex -o $@
+
 
 clean:
 	rm -f *.pdf
+	rm -f *.Rmd
+	rm -f *.html
+
 # 
diff --git a/docs/paper/extend_methods.Rmd b/docs/paper/extend_methods.Rmd
new file mode 100644
index 0000000000000000000000000000000000000000..0cb312930a437474671128a5cb7fa713af12f534
--- /dev/null
+++ b/docs/paper/extend_methods.Rmd
@@ -0,0 +1,32 @@
+# Methods
+
+```{r options-chunk}
+opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
+```
+
+``` {r This deals with some path issues, echo = FALSE, results = 'hide'}
+git.root <- function() {
+    system("git rev-parse --show-toplevel", intern=TRUE)
+}
+source.root <- function(filename) {
+    source(file.path(git.root(), filename), chdir=TRUE)
+}
+readRDS.root <- function(filename) {
+    readRDS(file.path(git.root(), filename))
+}
+```
+
+``` {r Load script, echo = FALSE, results = 'hide', message=FALSE}
+path.root <- git.root()
+```
+
+``` {r ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE}
+library(pander)
+data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv')) 
+```
+
+
+
+``` {r TableE1_Data, echo = FALSE, results='asis', message=FALSE}
+pandoc.table(data.set[, 1:4], caption = "Data description")
+```
diff --git a/docs/paper/extend_methods.md b/docs/paper/extend_methods.md
new file mode 100644
index 0000000000000000000000000000000000000000..00f03175d7d524b03961d70cd91a981e674b19b3
--- /dev/null
+++ b/docs/paper/extend_methods.md
@@ -0,0 +1,73 @@
+% Extended Methods
+
+# Data
+
+## Data preparation and analysis
+
+## Tree plot data
+We collected data reporting individuals tree growth and allowing to compute the local abundance of competitors in the neighboroud. The objective was collate data sets spanning
+most of the forest biomes of the world. Key points for inclusion was good coverage for at least one of the traits of interest (SLA, wood density, and maximum height) (in tropical forest it was one of the main limitation).
+
+
+Explain plot size and add in table
+
+Data formating
+
+Competition index
+
+# Traits data
+
+# Climatic data and Whittaker biomes
+
+# Model
+
+The models fitted were based on Equation \label{G1}:
+
+$\log{G_{s,f,p,i,t}} = log{G_{max}} + D_{i,t} \times{\gamma} +  (\sum_{n=1}^{N_p} {\alpha_{n,f} \times B_{n}})$
+
+where:
+
+- $G_{s,f,p,i,t}$ is the basal area growth, of the individual $i$ on plot $p$ at time $t$ and species $f$ from set $s$,
+- $\log{G_{max}}$ is the intercept representing log basal area growth with no competition,
+- $\gamma$ represents the diameter $D$ (dbh) slope with a random focal species $f$ effect and a random biomes effect, and
+- $B_n$ is basal area of the neighboring species $n$.  Here if the competitive parameters $\alpha_{n,f}$ is negative this represents competition, if positive facilitation (I have changed $\lambda$ to $\alpha$ because $\alpha$ seems more classical for competition coefficient).
+
+**The traits effect are included in the parameter $G_{max}$ and $\alpha$ as**
+
+$\log{G_{max}} = \beta_0 + \beta_1 \times t_f$
+
+where:
+
+- $\beta_0$ is mean Gmax, including a plot/quadrat $p$ random effect, a random focal species $f$ effect, and a random set effect $s$ to account for the difference between data set (Note that a random individual $i$ effect when multiple census are present is missing so far - because this is not easy to have a random effect for only a part of the data set in lme4 but I have that included in *stan*).
+
+- $\beta_1$ is the slope for the link between $G_{max}$ and the trait $t_f$ with a random biomes effect.
+
+
+$\alpha_{n,f}= c_0 + c_r \times t_f + c_e \times t_n + c_l \times \vert t_n-t_f \vert$
+
+where:
+
+- $c_0$ is the mean competition effect with a random biomes effect, and including a random focal $f$ species effect,
+
+- $c_r$ is the slope for the link between competition and the trait $t_f$ of the focal species with a random biomes effect, this thus the competitive response part in the framework of the workshop,
+
+- $c_e$ is the slope for the link between competition and the trait $t_n$ the trait of the neighbourhood trees with a random biomes effect, this thus the competitive effect part in the framework of the workshop,
+
+- $c_l$ is the slope for the link between competition and absolute distance of the trait  $\vert{t_n-t_f}\vert$ with a random biomes effect, this thus the absolute distance/limiting similarity part in the framework of the workshop.
+
+The models were all fitted for each traits using the community weighted mean index that David Coomes derived by expanding the equation of $\alpha$ in the sum:
+
+$\sum_{n=1}^{N_p} {\alpha_{n,f} \times B_{n}} = c_0 \times B_{tot} + c_r \times t_f \times B_{tot} + c_e \times B_{t_n} +c_l \times B_{\vert t_n - t_f \vert}$.
+
+Where:
+
+- $B_{tot} = \sum_{n=1}^{N_p} { B_{n}}$,
+
+- $B_{t_n} = \sum_{n=1}^{N_p} {t_n \times B_{n}}$,
+
+- and $B_{\vert t_n - t_f \vert} = \sum_{n=1}^{N_p} {\vert t_n - t_f \vert \times B_{n}}$.
+
+All explicative variables and the response variable were standardized by Std. Dev. so the parameters are effect size.  The model were fitted using $lmer$ in $lme4$ with a sub-sampling of 1000000 individuals with the sampling probability set as either *1/Nobs per ecoregion* (the ecoregion used in the previous analysis), or as *1/Nobs per species*. This is to avoid over representation of ecoregion or species which are very abundant in the global data set.
+
+
+
diff --git a/docs/paper/extended_data.R b/docs/paper/extended_data.R
new file mode 100644
index 0000000000000000000000000000000000000000..171d00ec9567cf91b4d5e58e8b5fdce1d79a7de9
--- /dev/null
+++ b/docs/paper/extended_data.R
@@ -0,0 +1,43 @@
+## # Methods
+
+## ```{r options-chunk}
+## opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
+## ```
+
+##+ This deals with some path issues, echo = FALSE, results = 'hide'
+git.root <- function() {
+    system("git rev-parse --show-toplevel", intern=TRUE)
+}
+source.root <- function(filename) {
+    source(file.path(git.root(), filename), chdir=TRUE)
+}
+readRDS.root <- function(filename) {
+    readRDS(file.path(git.root(), filename))
+}
+
+##+ Load script, echo = FALSE, results = 'hide', message=FALSE
+path.root <- git.root()
+
+##+ ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE
+library(pander)
+data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv'))
+dat.2 <- t(data.set[, -(1:2)])
+colnames(dat.2) <-  data.set$set
+var.names <- rownames(dat.2)
+var.names[1] <- '# of trees'
+var.names[2] <- '# of species'
+var.names[3] <- '# of plots/quadrats'
+var.names[4] <- '% of angiosperm'
+var.names[5] <- '% of evergreen'
+var.names[6] <- '% cover Leaf N'
+var.names[7] <- '% cover Seed mass'
+var.names[8] <- '% cover SLA'
+var.names[9] <- '% cover Wood density'
+var.names[10] <- '% cover Max height'
+rownames(dat.2) <-  var.names
+dat.2 <-  as.data.frame(dat.2)
+dat.2$Var <- var.names
+rownames(dat.2) <-  NULL
+dat.2 <- dat.2[, c(15, 1:14)]
+##+ TableE1_Data, echo = FALSE, results='asis', message=FALSE
+pandoc.table(dat.2[1:10, ], caption = "Data description")
diff --git a/docs/paper/extended_data.Rmd b/docs/paper/extended_data.Rmd
new file mode 100644
index 0000000000000000000000000000000000000000..7eac11584b869fc246b38357a9c2a371dbf8eb1e
--- /dev/null
+++ b/docs/paper/extended_data.Rmd
@@ -0,0 +1,47 @@
+# Methods
+
+```{r options-chunk}
+opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
+```
+
+``` {r This deals with some path issues, echo = FALSE, results = 'hide'}
+git.root <- function() {
+    system("git rev-parse --show-toplevel", intern=TRUE)
+}
+source.root <- function(filename) {
+    source(file.path(git.root(), filename), chdir=TRUE)
+}
+readRDS.root <- function(filename) {
+    readRDS(file.path(git.root(), filename))
+}
+```
+
+``` {r Load script, echo = FALSE, results = 'hide', message=FALSE}
+path.root <- git.root()
+```
+
+``` {r ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE}
+library(pander)
+data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv'))
+dat.2 <- t(data.set[, -(1:2)])
+colnames(dat.2) <-  data.set$set
+var.names <- rownames(dat.2)
+var.names[1] <- '# of trees'
+var.names[2] <- '# of species'
+var.names[3] <- '# of plots/quadrats'
+var.names[4] <- '% of angiosperm'
+var.names[5] <- '% of evergreen'
+var.names[6] <- '% cover Leaf N'
+var.names[7] <- '% cover Seed mass'
+var.names[8] <- '% cover SLA'
+var.names[9] <- '% cover Wood density'
+var.names[10] <- '% cover Max height'
+rownames(dat.2) <-  var.names
+dat.2 <-  as.data.frame(dat.2)
+dat.2$Var <- var.names
+rownames(dat.2) <-  NULL
+dat.2 <- dat.2[, c(15, 1:14)]
+```
+``` {r TableE1_Data, echo = FALSE, results='asis', message=FALSE}
+pandoc.table(dat.2[1:10, ], caption = "Data description")
+```
diff --git a/docs/paper/extended_data.md b/docs/paper/extended_data.md
new file mode 100644
index 0000000000000000000000000000000000000000..97b721599f46ab0827e82694bdf404299971f906
--- /dev/null
+++ b/docs/paper/extended_data.md
@@ -0,0 +1,90 @@
+# Methods
+
+
+```r
+opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
+```
+
+
+
+
+
+
+
+------------------------------------------------------------
+        Var           Sweden   NVS     US     Canada   NSW  
+-------------------- -------- ------ ------- -------- ------
+     # of trees       202401  53775  1370787  495008   906  
+
+    # of species        26     117     492      75     101  
+
+# of plots/quadrats   23487    1415   59840   15995     63  
+
+  % of angiosperm     0.2703  0.9401 0.6334   0.3438  0.9989
+
+   % of evergreen     0.7293  0.991  0.3724   0.6485  0.9238
+
+   % cover Leaf N     0.9972  0.9911 0.9231   0.9949    0   
+
+ % cover Seed mass    0.9972  0.9995 0.9918   0.9958    1   
+
+    % cover SLA       0.9972  0.9986 0.9132   0.9945    0   
+
+% cover Wood density  0.9968  0.9959 0.9443   0.9943  0.9923
+
+ % cover Max height   0.9792  0.9999    1     0.9986    1   
+------------------------------------------------------------
+
+Table: Data description (continued below)
+
+ 
+----------------------------------------------------------
+ France   Swiss   Spain   BCI    Paracou   Japan   Fushan 
+-------- ------- ------- ------ --------- ------- --------
+ 184316   28327  418805  27063    46364    4587    14701  
+
+  127      61      122    239      710      138      72   
+
+ 17611    2597    36462   2033    2157      318     623   
+
+ 0.7414  0.3629  0.3469  0.9979     1     0.7273   0.9204 
+
+ 0.285   0.5518  0.8163  0.7777  0.8347   0.7029   0.7527 
+
+ 0.9886  0.9922  0.9936  0.9283  0.7266      0     0.8034 
+
+ 0.9916  0.9922  0.9901  0.9358   0.558   0.9704   0.6441 
+
+ 0.9921  0.9678  0.9731  0.9305  0.7344   0.9969   0.9997 
+
+ 0.989   0.9508  0.9895  0.931   0.7364   0.9969   0.9935 
+
+ 0.9999  0.9965     1    0.9543  0.6362   0.9985   0.9585 
+----------------------------------------------------------
+
+Table: Table continues below
+
+ 
+-------------------
+ Luquillo   Mbaiki 
+---------- --------
+  14011     17616  
+
+    82       204   
+
+   399       989   
+
+    1       0.9951 
+
+  0.9904    0.7256 
+
+  0.9928    0.4019 
+
+  0.9928   0.01413 
+
+  0.9928    0.4019 
+
+  0.9928    0.4717 
+
+  0.9928      0    
+-------------------
diff --git a/docs/paper/extended_methods.md b/docs/paper/extended_methods.md
new file mode 100644
index 0000000000000000000000000000000000000000..992d40b4bbbea6b8c36e5b5980dfe84cc24c4850
--- /dev/null
+++ b/docs/paper/extended_methods.md
@@ -0,0 +1,76 @@
+% Extended Methods
+
+# Data
+
+## Data preparation and analysis
+
+## Tree plot data
+We collected data reporting individuals tree growth and allowing to
+compute the local abundance of competitors in their neighbourhood. The
+objective was collate data sets spanning most of the forest biomes of
+the world. Key points for inclusion was good coverage for at least one
+of the traits of interest (SLA, wood density, and maximum height) (in
+tropical forest it was one of the main limitation). We collected two
+main type of data: (1) national forest inventory where tree above a given threshold ar sampled in a network of small plots covering the country (with a sampling generally stratified by forest type); (2) large permanent plot in size ranging from 0.5ha to 50ha where the x-y coordinates of all tree above a given threshold are recorded. These large plots are generally located in tropical climate but some plots are also located in temperate climate. Tree growth are
+estimated through diameter at breast heigh (dbh) multiple-census (the only exception being French
+data where growth is estimated with short core) and the species of each individuals is recorded. The minimum dbh for measurment of tree range between 1cm to 10cm, to allow comparison between data set we restricted our analysis for tree greater than 10cm of dbh.
+
+Explain plot size and add in table
+
+Data formating
+
+Competition index
+
+# Traits data
+
+# Climatic data and Whittaker biomes
+
+# Model
+
+The models fitted were based on Equation \label{G1}:
+
+$\log{G_{s,f,p,i,t}} = log{G_{max}} + D_{i,t} \times{\gamma} +  (\sum_{n=1}^{N_p} {\alpha_{n,f} \times B_{n}})$
+
+where:
+
+- $G_{s,f,p,i,t}$ is the basal area growth, of the individual $i$ on plot $p$ at time $t$ and species $f$ from set $s$,
+- $\log{G_{max}}$ is the intercept representing log basal area growth with no competition,
+- $\gamma$ represents the diameter $D$ (dbh) slope with a random focal species $f$ effect and a random biomes effect, and
+- $B_n$ is basal area of the neighboring species $n$.  Here if the competitive parameters $\alpha_{n,f}$ is negative this represents competition, if positive facilitation (I have changed $\lambda$ to $\alpha$ because $\alpha$ seems more classical for competition coefficient).
+
+**The traits effect are included in the parameter $G_{max}$ and $\alpha$ as**
+
+$\log{G_{max}} = \beta_0 + \beta_1 \times t_f$
+
+where:
+
+- $\beta_0$ is mean Gmax, including a plot/quadrat $p$ random effect, a random focal species $f$ effect, and a random set effect $s$ to account for the difference between data set (Note that a random individual $i$ effect when multiple census are present is missing so far - because this is not easy to have a random effect for only a part of the data set in lme4 but I have that included in *stan*).
+
+- $\beta_1$ is the slope for the link between $G_{max}$ and the trait $t_f$ with a random biomes effect.
+
+
+$\alpha_{n,f}= c_0 + c_r \times t_f + c_e \times t_n + c_l \times \vert t_n-t_f \vert$
+
+where:
+
+- $c_0$ is the mean competition effect with a random biomes effect, and including a random focal $f$ species effect,
+
+- $c_r$ is the slope for the link between competition and the trait $t_f$ of the focal species with a random biomes effect, this thus the competitive response part in the framework of the workshop,
+
+- $c_e$ is the slope for the link between competition and the trait $t_n$ the trait of the neighbourhood trees with a random biomes effect, this thus the competitive effect part in the framework of the workshop,
+
+- $c_l$ is the slope for the link between competition and absolute distance of the trait  $\vert{t_n-t_f}\vert$ with a random biomes effect, this thus the absolute distance/limiting similarity part in the framework of the workshop.
+
+The models were all fitted for each traits using the community weighted mean index that David Coomes derived by expanding the equation of $\alpha$ in the sum:
+
+$\sum_{n=1}^{N_p} {\alpha_{n,f} \times B_{n}} = c_0 \times B_{tot} + c_r \times t_f \times B_{tot} + c_e \times B_{t_n} +c_l \times B_{\vert t_n - t_f \vert}$.
+
+Where:
+
+- $B_{tot} = \sum_{n=1}^{N_p} { B_{n}}$,
+
+- $B_{t_n} = \sum_{n=1}^{N_p} {t_n \times B_{n}}$,
+
+- and $B_{\vert t_n - t_f \vert} = \sum_{n=1}^{N_p} {\vert t_n - t_f \vert \times B_{n}}$.
+
+All explicative variables and the response variable were standardized by Std. Dev. so the parameters are effect size.  The model were fitted using $lmer$ in $lme4$ with a sub-sampling of 1000000 individuals with the sampling probability set as either *1/Nobs per ecoregion* (the ecoregion used in the previous analysis), or as *1/Nobs per species*. This is to avoid over representation of ecoregion or species which are very abundant in the global data set.
diff --git a/docs/paper/extended_methods.md~ b/docs/paper/extended_methods.md~
new file mode 100644
index 0000000000000000000000000000000000000000..00f03175d7d524b03961d70cd91a981e674b19b3
--- /dev/null
+++ b/docs/paper/extended_methods.md~
@@ -0,0 +1,73 @@
+% Extended Methods
+
+# Data
+
+## Data preparation and analysis
+
+## Tree plot data
+We collected data reporting individuals tree growth and allowing to compute the local abundance of competitors in the neighboroud. The objective was collate data sets spanning
+most of the forest biomes of the world. Key points for inclusion was good coverage for at least one of the traits of interest (SLA, wood density, and maximum height) (in tropical forest it was one of the main limitation).
+
+
+Explain plot size and add in table
+
+Data formating
+
+Competition index
+
+# Traits data
+
+# Climatic data and Whittaker biomes
+
+# Model
+
+The models fitted were based on Equation \label{G1}:
+
+$\log{G_{s,f,p,i,t}} = log{G_{max}} + D_{i,t} \times{\gamma} +  (\sum_{n=1}^{N_p} {\alpha_{n,f} \times B_{n}})$
+
+where:
+
+- $G_{s,f,p,i,t}$ is the basal area growth, of the individual $i$ on plot $p$ at time $t$ and species $f$ from set $s$,
+- $\log{G_{max}}$ is the intercept representing log basal area growth with no competition,
+- $\gamma$ represents the diameter $D$ (dbh) slope with a random focal species $f$ effect and a random biomes effect, and
+- $B_n$ is basal area of the neighboring species $n$.  Here if the competitive parameters $\alpha_{n,f}$ is negative this represents competition, if positive facilitation (I have changed $\lambda$ to $\alpha$ because $\alpha$ seems more classical for competition coefficient).
+
+**The traits effect are included in the parameter $G_{max}$ and $\alpha$ as**
+
+$\log{G_{max}} = \beta_0 + \beta_1 \times t_f$
+
+where:
+
+- $\beta_0$ is mean Gmax, including a plot/quadrat $p$ random effect, a random focal species $f$ effect, and a random set effect $s$ to account for the difference between data set (Note that a random individual $i$ effect when multiple census are present is missing so far - because this is not easy to have a random effect for only a part of the data set in lme4 but I have that included in *stan*).
+
+- $\beta_1$ is the slope for the link between $G_{max}$ and the trait $t_f$ with a random biomes effect.
+
+
+$\alpha_{n,f}= c_0 + c_r \times t_f + c_e \times t_n + c_l \times \vert t_n-t_f \vert$
+
+where:
+
+- $c_0$ is the mean competition effect with a random biomes effect, and including a random focal $f$ species effect,
+
+- $c_r$ is the slope for the link between competition and the trait $t_f$ of the focal species with a random biomes effect, this thus the competitive response part in the framework of the workshop,
+
+- $c_e$ is the slope for the link between competition and the trait $t_n$ the trait of the neighbourhood trees with a random biomes effect, this thus the competitive effect part in the framework of the workshop,
+
+- $c_l$ is the slope for the link between competition and absolute distance of the trait  $\vert{t_n-t_f}\vert$ with a random biomes effect, this thus the absolute distance/limiting similarity part in the framework of the workshop.
+
+The models were all fitted for each traits using the community weighted mean index that David Coomes derived by expanding the equation of $\alpha$ in the sum:
+
+$\sum_{n=1}^{N_p} {\alpha_{n,f} \times B_{n}} = c_0 \times B_{tot} + c_r \times t_f \times B_{tot} + c_e \times B_{t_n} +c_l \times B_{\vert t_n - t_f \vert}$.
+
+Where:
+
+- $B_{tot} = \sum_{n=1}^{N_p} { B_{n}}$,
+
+- $B_{t_n} = \sum_{n=1}^{N_p} {t_n \times B_{n}}$,
+
+- and $B_{\vert t_n - t_f \vert} = \sum_{n=1}^{N_p} {\vert t_n - t_f \vert \times B_{n}}$.
+
+All explicative variables and the response variable were standardized by Std. Dev. so the parameters are effect size.  The model were fitted using $lmer$ in $lme4$ with a sub-sampling of 1000000 individuals with the sampling probability set as either *1/Nobs per ecoregion* (the ecoregion used in the previous analysis), or as *1/Nobs per species*. This is to avoid over representation of ecoregion or species which are very abundant in the global data set.
+
+
+
diff --git a/docs/paper/include.tex b/docs/paper/include.tex
index 9e10f0406dbfee7c213e337decc9e5506417d82b..ec69c7cd0fee5bc59d7eb8f301e51530314730e5 100644
--- a/docs/paper/include.tex
+++ b/docs/paper/include.tex
@@ -6,6 +6,8 @@
 
 \usepackage[T1]{fontenc}
 \usepackage{lmodern}
+\usepackage{longtable}
+\usepackage{booktabs}
 \usepackage{amssymb,amsmath}
 \usepackage{ifxetex,ifluatex}
 \usepackage{fixltx2e} % provides \textsubscript
@@ -78,6 +80,7 @@ $if(verbatim-in-note)$
 $endif$
 $if(tables)$
 \usepackage{longtable}
+\usepackage{booktabs}
 $endif$
 $if(graphics)$
 \usepackage{graphicx}
diff --git a/docs/paper/paper.md b/docs/paper/paper.md
index cc45f59c6a04df5af13c815c329d30ec9fe570e6..add9421673db512750976646557c102dce6ef6ec 100644
--- a/docs/paper/paper.md
+++ b/docs/paper/paper.md
@@ -1,5 +1,5 @@
-%Functional traits have globally consistent effects on plant competition
-%Georges Kunstler
+%Title : Functional traits have globally consistent effects on plant competition
+%Authors: Georges Kunstler
 
 
 # Letters to nature guideline
@@ -9,18 +9,31 @@
 - rest max 1500 words long
 - Any discussion at the end of the text should be as succinct as possible, not repeating previous summary/introduction material, to briefly convey the general relevance of the work.
 - 3 or 4 figures or tables
-- Word counts refer to the text of the paper. References, title, author list and acknowledgements do not have to be included in total word counts.
+- Word counts refer to the text of the paper. References, title, legend, author list and acknowledgements do not have to be included in total word counts. Including capation of the figure ?
 
+
+5.11 Extended Data
+Extended Data figures and tables are online-only (appearing in the online PDF and full-text HTML version of the paper), peer-reviewed display items that provide essential background to the Article or Letter but are not included in the printed version of the paper due to space constraints or being of interest only to a few specialists. A maximum of ten Extended Data display items (figures and tables) is permitted. See Composition of a Nature research paper.
+
+Extended Data tables should be formatted along similar lines to tables appearing in print (see section 5.7) but the main body (excluding title and legend, which should be included at the end of the Word file) should be submitted separately as an image rather than as an editable format in Word, as Extended Data tables are not edited by Nature’s subediting department. Small tables may also be included as sub-panels within Extended Data figures. See Extended Data Formatting Guide.
+
+Extended Data figures should be prepared along slightly different guidelines compared to figures appearing in print, and may be multi-panelled as long as they fit to size rules (see Extended Data Formatting Guide). Extended Data figures are not edited or styled by Nature’s art department; for this reason, authors are requested to follow Nature style as closely as possible when preparing these figures. The legends for Extended Data figures should be prepared as for print figures and should be listed one after the other at the end of the Word file.
+
+If space allows, Nature encourages authors to include a simple schematic, as a panel in an Extended Data figure, that summarizes the main finding of the paper, where appropriate (for example, to assist understanding of complex detail in cell, structural and molecular biology disciplines).
+
+If a manuscript has Extended Data figures or tables, authors are asked to refer to discrete items at an appropriate place in the main text (for example, Extended Data Fig. 1 and Extended Data Table 1).
+
+If further references are included in the Extended Data tables and Extended Data figure legends, the numbering should continue from the end of the last reference number in the main paper (or from the last reference number in the additional Methods section if present) and the list should be added to the end of the list accompanying the additional Methods section, if present, or added below the Extended Data legends if no additional Methods section is present.
 # Summary paragraph outline (max 200 words)
 
-Competition is a very important type of ecological interaction, especially in terrestrial vegetation where plants greatly modify the local environment for each other. Competition has influence on growth of individuals and survival, on how species mixtures will change over time into the future, and on community composition. However firm generalizations have yet to be established about outcomes of competition among tree species.Here we show how key species traits have consistent influences on growth and competition. The data sources are very large, including national forest inventories monitoring growth in sometimes millions of trees, and we here synthesize across a global set of such inventories plus also several large forest-monitoring plots. Some traits have strong effect on the growth rate of the species. Then traits in part determine the tolerance to competition and the impact of the competitor. A notable generalization is that trait values that favour tolerance to competition also render species slow growing in absence of competition. There is also a small but detectable benefit in reducing competition from trait-dissimilarity between focal plant and its competitors.  The trait-based picture that emerges is much simpler and more general than a quantification of competition coefficients between each pair of species, which is intractable at the global scale. Our results demonstrate that traits may be used to predict competitive interactions between forest tree species at a large scale. We anticipate that our results can have profound influence on trait model of community assembly.
+Competition is a very important type of ecological interaction, especially in terrestrial vegetation where plants greatly modify the local environment for each other. Competition has influence on growth of individuals and survival, on how species mixtures will change over time into the future, and on community composition. However firm generalizations have yet to be established about outcomes of competition among tree species. Here we show how key species traits have consistent influences on growth and competition. The data sources are very large, including national forest inventories monitoring growth in sometimes millions of trees, and we here synthesize across a global set of such inventories plus also several large forest-monitoring plots. Some traits have strong effect on the growth rate of the species. Then traits in part determine the tolerance to competition and the impact of the competitor. A notable generalization is that trait values that favour tolerance to competition also render species slow growing in absence of competition. There is also a small but detectable benefit in reducing competition from trait-dissimilarity between focal plant and its competitors.  The trait-based picture that emerges is much simpler and more general than a quantification of competition coefficients between each pair of species, which is intractable at the global scale. Our results demonstrate that traits may be used to predict competitive interactions between forest tree species at a large scale. We anticipate that our results can have profound influence on trait model of community assembly.
 
 # Main text
 
 Competition is a fundamental type of interaction in ecological communities. Each individual modify their neighbouring environment and thus influences the growth, survival and reproduction of neighbouring individuals. Competition thus connects individuals in a community and influences species composition and its changes over time.  Maybe competition is especially important for vegetation on land because most vegetation types have high enough cover that shading and water and nutrient depletion are conspicuous. There have thus been a very large number of studies on competition among plants, but firm generalizations have yet to be established about outcomes of competition among plant species.
 
-When competition is described as interactions between pairs of species (as it traditionally has been), the number of different interactions to be measured grows explosively with the number of species (N^2) interacting, and becomes quickly intractable. Also this species-pair approach does not lead naturally to generalization across forests on different continents with different composition. Here we quantify competition between trees (in the sense of influence of neighbours on growth of a focal tree) within a framework, which is novel in two important ways: (i) competition is modelled as a function of traits rather than of species and (ii) we partition how traits drive the outcome of competition in four different key processes (Fig. 1). Competition can select trait values that are the most competitive. This competitive advantage of trait values can arise because (1) there are correlated with higher potential growth (in absence of competition) [@wright_functional_2010], (2) they are correlated with a higher tolerance to competition [@goldberg_competitive_1996], or (3) they are correlated with higher impact of neighbourhood competitors on the focal individual [@gaudet_comparative_1988]. In contrast, competition can promotes the coexistence of a mixture of traits values. The classical process though to be at play in that case is that (4) competition decrease with increasing dissimilarity of the traits of the competitor and the focal tree [@macarthur_limiting_1967]. However, how key traits defining plant strategies affect these four processes is uncertain.
-Here we dissect how three traits (maximum height, wood density and specific leaf area - SLA) affect these four processes involved in competition between trees using neighbouring modelling approach. We compiled data of growth along side local abundance of their competitor for more than 8 million trees representing more than 2500 species covering all the major biomes of the earth (Fig. 1b). We analysed how the potential growth of each individual tree was reduced by the local abundance of its competitors. Our analysis accounts for the trait of both the focal tree and its competitors estimating the trait effect for each of the processes presented in Fig. 1.  
+When competition is described as interactions between pairs of species (as it traditionally has been), the number of different interactions to be measured grows explosively with the number of species ($N^2$) interacting, and becomes quickly intractable. Also this species-pair approach does not lead naturally to generalization across forests on different continents with different composition. Here we quantify competition between trees (in the sense of influence of neighbours on growth of a focal tree) within a framework, which is novel in two important ways: (i) competition is modelled as a function of traits rather than of species and (ii) we partition how traits drive the outcome of competition in four different key processes (Fig. 1). Competition can select trait values that are the most competitive. This competitive advantage of trait values can arise because (1) there are correlated with higher potential growth (in absence of competition) [@wright_functional_2010], (2) they are correlated with a higher tolerance to competition [@goldberg_competitive_1996], or (3) they are correlated with higher impact of neighbourhood competitors on the focal individual [@gaudet_comparative_1988]. In contrast, competition can promotes the coexistence of a mixture of traits values. The classical process though to be at play in that case is that (4) competition decrease with increasing dissimilarity of the traits of the competitor and the focal tree [@macarthur_limiting_1967]. However, how key traits defining plant strategies affect these four processes is uncertain.
+Here we dissect how three traits (maximum height, wood density and specific leaf area - SLA) affect these four processes involved in competition between trees using neighbouring modeling approach. We compiled data of growth along side local abundance of their competitor for more than 8 million trees representing more than 2500 species covering all the major biomes of the earth (Fig. 1b). We analysed how the potential growth of each individual tree was reduced by the local abundance of its competitors. Our analysis accounts for the trait of both the focal tree and its competitors estimating the trait effect for each of the processes presented in Fig. 1.  
   Across all biomes we found that strongest drivers of individual growth was first-ranked the local abundance (basal area) of competitors; and second ranked the direct influence of the focal plant’s traits on its growth (Fig. 2a Extended data Table 1). We detected only negative effect of the abundance of competitors showing that competition was the predominant process. Among the three traits wood density had the strongest direct effect, followed by maximum height  whereas SLA had no detectable effect (Fig. 2a). Then our results show the influence of neighbour traits on their competitive impact, and of focal species traits on tolerance of competition from neighbours (Fig. 2a). The sum of these two effect is in the range of half or quarter as big as the direct trait effect (Extend data Table 2), down to zero influence depending on the trait (Fig 2a). Finally, there is a small but consistent effect whereby the wider is the absolute trait separation between focal and neighbour species, the weaker is competitive suppression of growth (Fig. 2a), this effect represents ????. An analysis allowing for different effect between biomes did no show strong evidence for any particular biome behaving consistently differently from the others (Fig. 2b). The exception are (1) the temperate biomes where SLA showed much stronger effect, probably ought to the dominance of deciduous species in this biome; and ????.
 
   The direction of the traits effect agree well with the existing literature and the traits effect. High wood density was lined with slow potential growth rate but high tolerance to competition, in agreement with the view that this is a trait value of shade-tolerant species [@wright_functional_2010]. There was also a tendency to a high competitive effect (** DISUCSS WORK OF LOURENS ON ARCHITECTURE**). **TODO** High SLA makes for a small overall positive effect on growth (remember these are not seedlings but reasonably large plants), an decreased competitive effect and no effect or possible weakly decreased competitive tolerance. The lack of effect of SLA on potential growth rate agree well with most previous studies on adult tree [@wright_functional_2010]. Maximum height: Tall eventual height makes for faster growth together with reduced tolerance and possibly reduced competitive effect! **THE RESULTS FOR MAXIMUM HEIGHT IS PROBABLY MORE SURPRISING DISCUSS MORE**.
@@ -29,13 +42,21 @@ Here we dissect how three traits (maximum height, wood density and specific leaf
 
 # Methods summary
 
-To examine the link between competition and traits we first compiled TREE data. Secondly extracted traits data from global or local data base : mean per species (no intraspecific variability) explain what we did when missing data. Discuss Fig. 1b. Thirdly local basal area in neighbourood. Analyses were restricted to trees with trunk diameter
-$>= 10cm$, and to species having $>=10$ trees. Then to analyse the traits effect on competition for the four processes presented in Fig. 1a, we fitted a mixed model to individual log basal area growth data EXPLAIN IN WORK GIVE EQUATION IN SUPPL MATS.
+To examine the link between competition and traits we first compiled forest plot data from both national forest inventory and long-term permanent plots from 14 countries covering all the major biomes of the world (Fig. 1b, see extanded Table 1); We restricted our analysis to tree with trunk diameter $>= 10cm$ to have a common minimum size across all data set. Second, we extracted traits mean per species (not accounting for intra-specific variability, and computing the genus mean if species data were lacking) from either a global ([TRY](http://www.try-db.org/) data base[@kattge_try_2011] or local data base (extanded Table 1), for three key traits: wood density, SLA, and Maximum height. Third, we computed the local abundance (measured as the basal area - $m^2/ha$) of competitors per species in the neighborhood of each tree. The neighborhood was defined as a 15m radius around the focal tree in large plot with X Y coordinates of all trees or as the whole plot for national forest inventory data that are based on small plot (the plot size correspond to a circular plot ranging from ?? to ??). Fourth, for each traits, we computed four crowding index that where representing (i) the overall crowding irrespective of the species trait (as the sum of basal area of local competitors), (ii) the overall crowding times the trait of focal species, representing how traits affect tolerance to competition, (iii) the mean traits of the competitor weighted by their abundance (basal area), representing how traits affect the competitive effect, and (iv) the mean of the trait absolute distance between the focal tree and the competitor species weighted per their abundance (basal area), representing how the dissimilarity of trait affect competition (see extend Methods). Only indivudla for which at least 80% of competitors had species level traits data and 95% genus level traits data were used (filling the missing value with the community mean). Finally, for each trait, we fitted a model estimating how individuals tree basal area growth was affected by the focal species traits (direct traits effect) and by these four crowding indexes, while accounting for size effect (see extend Methods for details). To facilitate comparison between parameters and traits all traits and variable were standaridised to a SD of one. We report these standardized parameters for each traits. Two models were fitted, (1) we included biomes as a random effect in each parameters to estimate the overall effect across all biomes and (ii) we included biomes as a fixed effect to analys the difference between biomes. 
 
+# References
+
+# Supplementary Information line
+
+# Acknowledgements
+
+# Author contributions
+
+# Author information
 
 # Outlines
 
-6.	Result 2: Influence of neighbour traits on their competitive impact, and of focal species traits on tolerance of competition from neighbours, are in the range of half or quarter as big as the direct trait effect (Result 1), down to zero influence depending on the trait (Fig 2 or Fig 3 in “quick.report.pdf”)
+6.	Result 2: Influence of neighbour traits on their competitive impact, and of focal species traits on tolerance of competition from neighbours, are in the range of half or quarter as big as the direct traiteffect (Result 1), down to zero influence depending on the trait (Fig 2 or Fig 3 in “quick.report.pdf”)
 6.1.	Digression here to explain that effect size is made up of two components: how wide is the variation in the trait (or in the basal area of competitors), and how large an effect is produced per unit change in the trait or in the amount of competitors. Maybe to quantify briefly? – out of the effect sizes, which of them are big because the trait or BA varies widely in practice, versus which are big because the response is steep per unit change?
 
 7.	There is a small but consistent effect whereby the wider is the absolute trait separation between focal and neighbour species, the weaker is competitive suppression of growth (Fig 2 or Fig 3 in “quick.report.pdf”)
@@ -53,3 +74,4 @@ $>= 10cm$, and to species having $>=10$ trees. Then to analyse the traits effect
 9.	Despite all the noise at the level of individual trees, overall the influence of specific traits is satisfyingly consistent across many forest types and climate zones. It is not so strong an influence as variation simply in the amount of competitors, but nevertheless has an influence.
 
 10.	The trade-off between faster growth in absence of competition and lower tolerance to competition is not in itself a surprise. The achievements of this paper are first to synthesize all that at world scale, and second to express it on a trait basis.
+
diff --git a/docs/paper/refs.bib b/docs/paper/refs.bib
new file mode 100644
index 0000000000000000000000000000000000000000..90429722ea60066eaf2af2abbaf63d9a07796ca0
--- /dev/null
+++ b/docs/paper/refs.bib
@@ -0,0 +1,255 @@
+
+@article{uriarte_trait_2010,
+	title = {Trait similarity, shared ancestry and the structure of neighbourhood interactions in a subtropical wet forest: implications for community assembly.},
+	url = {http://www.ncbi.nlm.nih.gov/pubmed/21054732},
+	doi = {10.1111/j.1461-0248.2010.01541.x},
+	abstract = {The phylogenetic structure and distribution of functional traits in a community can provide insights into community assembly processes. However, these insights are sensitive to the spatial scale of analysis. Here, we use spatially explicit, neighbourhood models of tree growth and survival for 19 tree species, a highly resolved molecular phylogeny and information on eight functional traits to quantify the relative efficacy of functional similarity and shared ancestry in describing the effects of spatial interactions between tree species on demographic rates. We also assess the congruence of these results with observed phylogenetic and functional structure in the neighbourhoods of live and dead trees. We found strong support for models in which the effects of spatial neighbourhood interactions on tree growth and survival were scaled to species-specific mean functional trait values (e.g., wood specific gravity, leaf succulence and maximum height) but not to phylogenetic distance. The weak phylogenetic signal in functional trait data allowed us to independently interpret the static neighbourhood functional and phylogenetic patterns. We observed greater functional trait similarity in the neighbourhoods of live trees relative to those of dead trees suggesting that environmental filtering is the major force structuring this tree community at this scale while competitive interactions play a lesser role.},
+	journal = {Ecology letters},
+	author = {Uriarte, María and Swenson, Nathan G and Chazdon, Robin L and Comita, L S and John Kress, W and Erickson, David and Forero-Montaña, Jimena and Zimmerman, Jess K and Thompson, Jill},
+	month = nov,
+	year = {2010},
+	keywords = {13, 1503, 1514, 2010, ecology letters, environmental filtering, genetic conservatism, luquillo forest dynamics plot, niche differentiation, phylo-, spatially explicit models, species interactions},
+	pages = {1503--1514},
+	file = {Uriarte et al_2010_Trait similarity, shared ancestry and the structure of neighbourhood.pdf:/home/georges/Dropbox/biblio/pdfNEW/Uriarte et al_2010_Trait similarity, shared ancestry and the structure of neighbourhood.pdf:application/pdf}
+}
+
+@article{macarthur_limiting_1967,
+	title = {The Limiting Similarity, Convergence, and Divergence of Coexisting Species},
+	volume = {101},
+	copyright = {Copyright © 1967 The University of Chicago},
+	issn = {00030147},
+	url = {http://www.jstor.org/stable/2459090},
+	doi = {10.2307/2459090},
+	abstract = {1. There is a limit to the similarity (and hence to the number) of competing species which can coexist. The total number of species is proportional to the total range of the environment divided by the niche breadth of the species. The number is reduced by unequal abundance of resources but increased by adding to the dimensionality of the niche. Niche breadth is increased with increased environmental uncertainty and with decreased productivity. 2. There is a different evolutionary limit, L, to the similarity of two coexisting species such that a) If two species are more similar than L, a third intermediate species will converge toward the nearer of the pair. b) If two species are more different than L, a third intermediate species will diverge from either toward a phenotype intermediate between the two.},
+	number = {921},
+	journal = {The American Naturalist},
+	author = {Macarthur, Robert and Levins, Richard},
+	month = sep,
+	year = {1967},
+	note = {{ArticleType}: research-article / Full publication date: Sep. - Oct., 1967 / Copyright © 1967 The University of Chicago},
+	pages = {377--385},
+	file = {Macarthur_Levins_1967_The Limiting Similarity, Convergence, and Divergence of Coexisting Species.pdf:/home/georges/Dropbox/biblio/pdfNEW/Macarthur_Levins_1967_The Limiting Similarity, Convergence, and Divergence of Coexisting Species.pdf:application/pdf}
+}
+
+@article{kraft_functional_2008,
+	title = {Functional traits and niche-based tree community assembly in an Amazonian forest.},
+	volume = {322},
+	url = {http://www.ncbi.nlm.nih.gov/pubmed/18948539},
+	doi = {10.1126/science.1160662},
+	abstract = {It is debated whether species-level differences in ecological strategy, which play a key role in much of coexistence theory, are important in structuring highly diverse communities. We examined the co-occurrence patterns of over 1100 tree species in a 25-hectare Amazonian forest plot in relation to field-measured functional traits. Using a null model approach, we show that co-occurring trees are often less ecologically similar than a niche-free (neutral) model predicts. Furthermore, we find evidence for processes that simultaneously drive convergence and divergence in key aspects of plant strategy, suggesting that at least two distinct niche-based processes are occurring. Our results show that strategy differentiation among species contributes to the maintenance of diversity in one of the most diverse tropical forests in the world.},
+	number = {5901},
+	journal = {Science},
+	author = {Kraft, Nathan J B and Valencia, Renato and Ackerly, David D.},
+	month = oct,
+	year = {2008},
+	keywords = {Biodiversity, Ecosystem, ecuador, Nitrogen, Nitrogen: analysis, Plant Leaves, Plant Leaves: anatomy \& histology, Plant Leaves: chemistry, Population Dynamics, Seeds, Trees, Trees: anatomy \& histology, Trees: growth \& development, Trees: physiology, Tropical Climate, Wood},
+	pages = {580--2},
+	file = {Kraft et al_2008_Functional traits and niche-based tree community assembly in an Amazonian forest.pdf:/home/georges/Dropbox/biblio/pdfNEW/Kraft et al_2008_Functional traits and niche-based tree community assembly in an Amazonian forest.pdf:application/pdf}
+}
+
+@article{mcmahon_high-dimensional_2011,
+	title = {High-Dimensional Coexistence of Temperate Tree Species: Functional Traits, Demographic Rates, Life-History Stages, and Their Physical Context},
+	volume = {6},
+	issn = {1932-6203},
+	shorttitle = {High-Dimensional Coexistence of Temperate Tree Species},
+	url = {http://dx.plos.org/10.1371/journal.pone.0016253},
+	doi = {10.1371/journal.pone.0016253},
+	number = {1},
+	urldate = {2012-10-22},
+	journal = {{PLoS} {ONE}},
+	author = {McMahon, Sean M. and Metcalf, Charlotte J. E. and Woodall, Christopher W.},
+	editor = {Thrush, Simon},
+	month = jan,
+	year = {2011},
+	pages = {e16253},
+	file = {McMahon et al_2011_High-Dimensional Coexistence of Temperate Tree Species.pdf:/home/georges/Dropbox/biblio/pdfNEW/McMahon et al_2011_High-Dimensional Coexistence of Temperate Tree Species.pdf:application/pdf}
+}
+
+@article{westoby_plant_2002,
+	title = {{PLANT} {ECOLOGICAL} {STRATEGIES}: Some Leading Dimensions of Variation Between Species},
+	volume = {33},
+	url = {http://arjournals.annualreviews.org/doi/abs/10.1146%2Fannurev.ecolsys.33.010802.150452},
+	doi = {10.1146/annurev.ecolsys.33.010802.150452},
+	number = {1},
+	journal = {Annual Review of Ecology, Evolution, and Systematics},
+	author = {Westoby, Mark and Falster, Daniel S. and Moles, Angela T. and Vesk, Peter a. and Wright, Ian J.},
+	month = nov,
+	year = {2002},
+	keywords = {foliage height, leaf lifespan, leaf mass per area, leaf size, seed mass},
+	pages = {125--159},
+	file = {Westoby et al_2002_PLANT ECOLOGICAL STRATEGIES.pdf:/home/georges/Dropbox/biblio/pdfNEW/Westoby et al_2002_PLANT ECOLOGICAL STRATEGIES.pdf:application/pdf}
+}
+
+@article{gamfeldt_higher_2013,
+	title = {Higher levels of multiple ecosystem services are found in forests with more tree species},
+	volume = {4},
+	url = {http://www.nature.com/ncomms/journal/v4/n1/abs/ncomms2328.html},
+	urldate = {2013-02-07},
+	journal = {Nature Communications},
+	author = {Gamfeldt, L. and Snäll, T. and Bagchi, R. and Jonsson, M. and Gustafsson, L. and Kjellander, P. and Ruiz-Jaen, M. C. and Fröberg, M. and Stendahl, J. and Philipson, C. D.},
+	year = {2013},
+	pages = {1340}
+}
+
+@article{goldberg_competitive_1996,
+	title = {Competitive ability: definitions, contingency and correlated traits},
+	volume = {351},
+	url = {http://www.jstor.org/stable/56213},
+	number = {1345},
+	journal = {Philosophical Transactions: Biological Sciences},
+	author = {Goldberg, DE},
+	year = {1996},
+	pages = {1377--1385}
+}
+
+@article{paquette_effect_2010,
+	title = {The effect of biodiversity on tree productivity: from temperate to boreal forests},
+	url = {http://doi.wiley.com/10.1111/j.1466-8238.2010.00592.x},
+	doi = {10.1111/j.1466-8238.2010.00592.x},
+	journal = {Global Ecology and Biogeography},
+	author = {Paquette, Alain and Messier, C.},
+	year = {2010},
+	keywords = {biodiversity and ecosystem functioning, boreal forests, canada, diversity, Ecosystem, fertility gradient, forest biomes, functional diversity, phylogenetic, services, temperate forests, tree productivity},
+	pages = {no},
+	file = {Paquette_Messier_2010_The effect of biodiversity on tree productivity.pdf:/home/georges/Dropbox/biblio/pdfNEW/Paquette_Messier_2010_The effect of biodiversity on tree productivity.pdf:application/pdf}
+}
+
+@article{kattge_try_2011,
+	title = {{TRY} - a global database of plant traits},
+	volume = {17},
+	issn = {13541013},
+	url = {http://doi.wiley.com/10.1111/j.1365-2486.2011.02451.x},
+	doi = {10.1111/j.1365-2486.2011.02451.x},
+	number = {9},
+	urldate = {2012-10-23},
+	journal = {Global Change Biology},
+	author = {Kattge, J. and DíAz, S. and Lavorel, S. and Prentice, I. C. and Leadley, P. and BöNisch, G. and Garnier, E. and Westoby, M. and Reich, P. B. and Wright, I. J. and Cornelissen, J. H. C. and Violle, C. and Harrison, S. P. and Van BODEGOM, P. M. and Reichstein, M. and Enquist, B. J. and Soudzilovskaia, N. A. and Ackerly, D. D. and Anand, M. and Atkin, O. and Bahn, M. and Baker, T. R. and Baldocchi, D. and Bekker, R. and Blanco, C. C. and Blonder, B. and Bond, W. J. and Bradstock, R. and Bunker, D. E. and Casanoves, F. and Cavender-Bares, J. and Chambers, J. Q. and Chapin Iii, F. S. and Chave, J. and Coomes, D. and Cornwell, W. K. and Craine, J. M. and Dobrin, B. H. and Duarte, L. and Durka, W. and Elser, J. and Esser, G. and Estiarte, M. and Fagan, W. F. and Fang, J. and FernáNdez-MéNdez, F. and Fidelis, A. and Finegan, B. and Flores, O. and Ford, H. and Frank, D. and Freschet, G. T. and Fyllas, N. M. and Gallagher, R. V. and Green, W. A. and Gutierrez, A. G. and Hickler, T. and Higgins, S. I. and Hodgson, J. G. and Jalili, A. and Jansen, S. and Joly, C. A. and Kerkhoff, A. J. and Kirkup, D. and Kitajima, K. and Kleyer, M. and Klotz, S. and Knops, J. M. H. and Kramer, K. and KüHn, I. and Kurokawa, H. and Laughlin, D. and Lee, T. D. and Leishman, M. and Lens, F. and Lenz, T. and Lewis, S. L. and Lloyd, J. and Llusià, J. and Louault, F. and Ma, S. and Mahecha, M. D. and Manning, P. and Massad, T. and Medlyn, B. E. and Messier, J. and Moles, A. T. and MüLler, S. C. and Nadrowski, K. and Naeem, S. and Niinemets, ü. and NöLlert, S. and NüSke, A. and Ogaya, R. and Oleksyn, J. and Onipchenko, V. G. and Onoda, Y. and OrdoñEz, J. and Overbeck, G. and Ozinga, W. A. and PatiñO, S. and Paula, S. and Pausas, J. G. and PeñUelas, J. and Phillips, O. L. and Pillar, V. and Poorter, H. and Poorter, L. and Poschlod, P. and Prinzing, A. and Proulx, R. and Rammig, A. and Reinsch, S. and Reu, B. and Sack, L. and Salgado-Negret, B. and Sardans, J. and Shiodera, S. and Shipley, B. and Siefert, A. and Sosinski, E. and Soussana, J.-F. and Swaine, E. and Swenson, N. and Thompson, K. and Thornton, P. and Waldram, M. and Weiher, E. and White, M. and White, S. and Wright, S. J. and Yguel, B. and Zaehle, S. and Zanne, A. E. and Wirth, C.},
+	month = sep,
+	year = {2011},
+	pages = {2905--2935},
+	file = {Kattge et al_2011_TRY - a global database of plant traits.pdf:/home/georges/Dropbox/biblio/pdfNEW/Kattge et al_2011_TRY - a global database of plant traits.pdf:application/pdf}
+}
+
+@article{cornwell_community_2009,
+	title = {Community assembly and shifts in plant trait distributions across an environmental gradient in coastal California},
+	volume = {79},
+	url = {http://www.esajournals.org/doi/abs/10.1890/07-1134.1},
+	doi = {10.1890/07-1134.1},
+	number = {1},
+	journal = {Ecological Monographs},
+	author = {Cornwell, William K. and Ackerly, David D.},
+	year = {2009},
+	keywords = {California, community assembly, Environment, environmental gradient, habitat filtering, jasper ridge biological preserve, limiting similarity, plant functional, species, trait relationship, usa},
+	pages = {109--126}
+}
+
+@article{rigling_driving_2013,
+	title = {Driving factors of a vegetation shift from Scots pine to pubescent oak in dry Alpine forests},
+	volume = {19},
+	issn = {1365-2486},
+	url = {http://dx.doi.org/10.1111/gcb.12038},
+	doi = {10.1111/gcb.12038},
+	number = {1},
+	journal = {Global Change Biology},
+	author = {Rigling, Andreas and Bigler, Christof and Eilmann, Britta and Feldmeyer-Christe, Elisabeth and Gimmi, Urs and Ginzler, Christian and Graf, Ulrich and Mayer, Philipp and Vacchiano, Giorgio and Weber, Pascale and Wohlgemuth, Thomas and Zweifel, Roman and Dobbertin, Matthias},
+	month = jan,
+	year = {2013},
+	keywords = {climate change, generalized linear models, inner-Alpine dry valleys, land-use change, mixed-effects models, pinus sylvestris, Quercus pubescens},
+	pages = {229--240},
+	file = {Rigling et al_2013_Driving factors of a vegetation shift from Scots pine to pubescent oak in dry.pdf:/home/georges/Dropbox/biblio/pdfNEW/Rigling et al_2013_Driving factors of a vegetation shift from Scots pine to pubescent oak in dry.pdf:application/pdf}
+}
+
+@article{wright_functional_2010,
+	title = {Functional traits and the growth-mortality trade-off in tropical trees},
+	volume = {91},
+	url = {http://www.esajournals.org/doi/abs/10.1890/09-2335.1},
+	number = {12},
+	urldate = {2012-10-23},
+	journal = {Ecology},
+	author = {Wright, S. J. and Kitajima, K. and Kraft, N. J. B. and Reich, P. B. and Wright, I. J. and Bunker, D. E. and Condit, R. and Dalling, J. W. and Davies, S. J. and Díaz, S. and others},
+	year = {2010},
+	pages = {3664--3674},
+	file = {Wright et al_2010_Functional traits and the growth-mortality trade-off in tropical trees2.pdf:/home/georges/Dropbox/biblio/pdfNEW/Wright et al_2010_Functional traits and the growth-mortality trade-off in tropical trees2.pdf:application/pdf}
+}
+
+@article{poorter_importance_2010,
+	title = {The importance of wood traits and hydraulic conductance for the performance and life history strategies of 42 rainforest tree species.},
+	volume = {185},
+	url = {http://www.ncbi.nlm.nih.gov/pubmed/19925555},
+	doi = {10.1111/j.1469-8137.2009.03092.x},
+	abstract = {*In a comparative study of 42 rainforest tree species we examined relationships amongst wood traits, diameter growth and survival of large trees in the field, and shade tolerance and adult stature of the species. *The species show two orthogonal axes of trait variation: a primary axis related to the vessel size-number trade-off (reflecting investment in hydraulic conductance vs hydraulic safety) and a secondary axis related to investment in parenchyma vs fibres (storage vs strength). Across species, growth rate was positively related to vessel diameter and potential specific hydraulic conductance (K(p)), and negatively related to wood density. Survival rate was only positively related to wood density. *Light-demanding species were characterized by low wood and vessel density and wide vessels. Tall species were characterized by wide vessels with low density and large K(p). Hydraulic traits were more closely associated with adult stature than with light demand, possibly because tall canopy species experience more drought stress and face a higher cavitation risk. *Vessel traits affect growth and wood density affects growth and survival of large trees in the field. Vessel traits and wood density are therefore important components of the performance and life history strategies of tropical tree species.},
+	number = {2},
+	journal = {New Phytologist},
+	author = {Poorter, Lourens and McDonald, Imole and Alarcón, Alfredo and Fichtler, Esther and Licona, Juan-Carlos and Peña-Claros, Marielos and Sterck, Frank and Villegas, Zulma and Sass-Klaassen, Ute},
+	month = jan,
+	year = {2010},
+	keywords = {adult stature, functional traits, growth, height, hydraulic conductance, in a comparative study, of 42 rainforest tree, shade tolerance, species we examined relationships, vessels, wood density},
+	pages = {481--92},
+	file = {Poorter et al_2010_The importance of wood traits and hydraulic conductance for the performance and.pdf:/home/georges/Dropbox/biblio/pdfNEW/Poorter et al_2010_The importance of wood traits and hydraulic conductance for the performance and.pdf:application/pdf}
+}
+
+@article{gourlet-fleury_environmental_2011,
+	title = {Environmental filtering of dense-wooded species controls above-ground biomass stored in African moist forests},
+	volume = {99},
+	url = {http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2745.2011.01829.x/full},
+	number = {4},
+	urldate = {2013-02-07},
+	journal = {Journal of Ecology},
+	author = {Gourlet-Fleury, S. and Rossi, V. and Rejou-Mechain, M. and Freycon, V. and Fayolle, A. and Saint-André, L. and Cornu, G. and Gerard, J. and Sarrailh, J. M. and Flores, O.},
+	year = {2011},
+	pages = {981--990}
+}
+
+@article{herault_functional_2011,
+	title = {Functional traits shape ontogenetic growth trajectories of rain forest tree species},
+	volume = {99},
+	url = {http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2745.2011.01883.x/full},
+	number = {6},
+	urldate = {2013-02-07},
+	journal = {Journal of ecology},
+	author = {Herault, B. and Bachelot, B. and Poorter, L. and Rossi, V. and Bongers, F. and Chave, J. and Paine, C. E. and Wagner, F. and Baraloto, C.},
+	year = {2011},
+	pages = {1431--1440}
+}
+
+@article{mayfield_opposing_2010,
+	title = {Opposing effects of competitive exclusion on the phylogenetic structure of communities.},
+	url = {http://www.ncbi.nlm.nih.gov/pubmed/20576030},
+	doi = {10.1111/j.1461-0248.2010.01509.x},
+	abstract = {Ecology Letters (2010) Abstract Though many processes are involved in determining which species coexist and assemble into communities, competition is among the best studied. One hypothesis about competition's contribution to community assembly is that more closely related species are less likely to coexist. Though empirical evidence for this hypothesis is mixed, it remains a common assumption in certain phylogenetic approaches for inferring the effects of environmental filtering and competitive exclusion. Here, we relate modern coexistence theory to phylogenetic community assembly approaches to refine expectations for how species relatedness influences the outcome of competition. We argue that two types of species differences determine competitive exclusion with opposing effects on relatedness patterns. Importantly, this means that competition can sometimes eliminate more different and less related taxa, even when the traits underlying the relevant species differences are phylogenetically conserved. Our argument leads to a reinterpretation of the assembly processes inferred from community phylogenetic structure.},
+	journal = {Ecology letters},
+	author = {Mayfield, Margaret M and Levine, Jonathan M},
+	year = {2010},
+	keywords = {13, 1085, 1093, 2010, coexistence, community assembly, competitive, competitive ability, ecology letters, exclusion, fitness differences, niches, phylogenetics, regional species pool},
+	pages = {1085--1093},
+	file = {Mayfield_Levine_2010_Opposing effects of competitive exclusion on the phylogenetic structure of.pdf:/home/georges/Dropbox/biblio/pdfNEW/Mayfield_Levine_2010_Opposing effects of competitive exclusion on the phylogenetic structure of.pdf:application/pdf}
+}
+
+@article{kunstler_competitive_2012,
+	title = {Competitive interactions between forest trees are driven by species' trait hierarchy, not phylogenetic or functional similarity: implications for forest community assembly.},
+	volume = {15},
+	url = {http://www.ncbi.nlm.nih.gov/pubmed/22625657},
+	doi = {10.1111/j.1461-0248.2012.01803.x},
+	abstract = {The relative importance of competition vs. environmental filtering in the assembly of communities is commonly inferred from their functional and phylogenetic structure, on the grounds that similar species compete most strongly for resources and are therefore less likely to coexist locally. This approach ignores the possibility that competitive effects can be determined by relative positions of species on a hierarchy of competitive ability. Using growth data, we estimated 275 interaction coefficients between tree species in the French mountains. We show that interaction strengths are mainly driven by trait hierarchy and not by functional or phylogenetic similarity. On the basis of this result, we thus propose that functional and phylogenetic convergence in local tree community might be due to competition-sorting species with different competitive abilities and not only environmental filtering as commonly assumed. We then show a functional and phylogenetic convergence of forest structure with increasing plot age, which supports this view.},
+	number = {8},
+	journal = {Ecology letters},
+	author = {Kunstler, Georges and Lavergne, Sébastien and Courbaud, Benoît and Thuiller, Wilfried and Vieilledent, Ghislain and Zimmermann, Niklaus E and Kattge, Jens and Coomes, David A},
+	year = {2012},
+	keywords = {2012, community assembly, competition, ecology letters, environmental filtering, functional similarity, netic relatedness, niche similarity, phyloge-, plant interaction, traits hierarchy},
+	pages = {831--40},
+	file = {Kunstler et al_2012_Competitive interactions between forest trees are driven by species' trait.pdf:/home/georges/Dropbox/biblio/pdfNEW/Kunstler et al_2012_Competitive interactions between forest trees are driven by species' trait.pdf:application/pdf}
+}
+
+@article{gaudet_comparative_1988,
+	title = {A comparative approach to predicting competitive ability from plant traits},
+	volume = {334},
+	url = {http://dx.doi.org/10.1038/334242a0},
+	doi = {10.1038/334242a0},
+	number = {6179},
+	journal = {Nature},
+	author = {Gaudet, Connie L. and Keddy, Paul A.},
+	month = jul,
+	year = {1988},
+	pages = {242--243},
+	file = {Gaudet_Keddy_1988_A comparative approach to predicting competitive ability from plant traits.pdf:/home/georges/Dropbox/biblio/pdfNEW/Gaudet_Keddy_1988_A comparative approach to predicting competitive ability from plant traits.pdf:application/pdf}
+}
\ No newline at end of file
diff --git a/docs/results_knitr/quick.report.R b/docs/results_knitr/quick.report.R
index 16f392193c03c404c1c7bb9fc17c6a5bb2593403..5337694c2ad0698512a7b1ddeedb744edd8e2a5b 100644
--- a/docs/results_knitr/quick.report.R
+++ b/docs/results_knitr/quick.report.R
@@ -140,7 +140,7 @@ list.all.results.species.id <-
 list.all.results.ecocode.id <-
     readRDS.root('output/list.lmer.out.all.ecocode.no.log.rds')
 
-## No resampling 
+## No resampling
 list.all.results <-
     readRDS.root('output/list.lmer.out.all.NA.no.log.rds')
 
@@ -192,7 +192,7 @@ plot.param(list.all.results.ecocode.id ,
 
 ## -Finally for all traits there is a positive effect of the traits absolute distance *Limit simil*. So species with dissimilar traits compete less strongly.
 
-## One solution to compare the relative importance of the traits is to take the absolute value of this effect size and for the *effect/response* sum their effect to have a single effect size (this is not perfect but a start).  
+## One solution to compare the relative importance of the traits is to take the absolute value of this effect size and for the *effect/response* sum their effect to have a single effect size (this is not perfect but a start).
 
 ##+ ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE
 library(pander)
@@ -451,7 +451,7 @@ legend("center",legend = names.biomes.t,
 
 ## - Related to this question, do we want to explore more the differences between biomes in term of traits effects than what I have so far? (somehow the motivation for that would be to explain the difference of forest structure between biomes).
 
-## - Estimation of the relative importance of the limiting similarity, the effect/response (can we do something better than the sum the effect size of competitive *response* and *effect*) and the direct traits effect on growth. 
+## - Estimation of the relative importance of the limiting similarity, the effect/response (can we do something better than the sum the effect size of competitive *response* and *effect*) and the direct traits effect on growth.
 
 ## \newpage
 
@@ -465,7 +465,7 @@ legend("center",legend = names.biomes.t,
 
 ## -The development of trait ecology, in recent years, have resulted in a vast accumulation of trait data but the measured traits are not comparable to the resource trait used by MacArthur. MacArthur' prediction is nevertheless generally invoked to claim that species with similar traits should compete more strongly that species with dissimilar traits.
 
-## -This is surprising because plant largely compete for a limited number of essential resources. Thus the traits are more likely to determine how a species deplete the resources and how a species respond to the resource availability (concept of competitive effect and competitive response to be explained). If there is a coordination between competitive response and effect, this would results in competitive hierarchy (This section require a lots of work to be clear!). 
+## -This is surprising because plant largely compete for a limited number of essential resources. Thus the traits are more likely to determine how a species deplete the resources and how a species respond to the resource availability (concept of competitive effect and competitive response to be explained). If there is a coordination between competitive response and effect, this would results in competitive hierarchy (This section require a lots of work to be clear!).
 
 ## -Traits also have direct effect on the performance without competition and this can contribute to competitive hierarchy with species having higher performance excluding species with lower performance.
 
@@ -481,7 +481,7 @@ legend("center",legend = names.biomes.t,
 ## - 2. Is there a traits effect on competitive effect/response?
 ## - 3. Is there a trait effect on competition promoting a limiting similarity?
 ## - 4. What is the relative importance of these effect?
-## - 5. Does these effects varies between the major forest biomes of the world? 
+## - 5. Does these effects varies between the major forest biomes of the world?
 
 ## ## Main results
 
@@ -497,5 +497,4 @@ legend("center",legend = names.biomes.t,
 
 ## -There is a trade-off growth without competition and tolerance to competition which is underpin by the trait. This could promote coexistence in a meta-population with succession (classical meca of coexistence in forest).
 
-## -Variation between biomes is limited. So overall traits effect are relatively consistent between biomes. But there is no clear pattern emerging for me? 
-
+## -Variation between biomes is limited. So overall traits effect are relatively consistent between biomes. But there is no clear pattern emerging for me?
diff --git a/docs/results_knitr/quick.report.fixed.effect.R b/docs/results_knitr/quick.report.fixed.effect.R
index f098bd78a713013ce90e67f950ba80ffde464956..9de9817502d942c1a8566f55b6c8c4ac8a7ca837 100644
--- a/docs/results_knitr/quick.report.fixed.effect.R
+++ b/docs/results_knitr/quick.report.fixed.effect.R
@@ -173,13 +173,27 @@ vec.rel.grad.NA < 0.001
 
 ### test new function for plot
 
-plot.growth.ba(traits = c('Wood.density', 'SLA', 'Max.height'),
+plot.growth.ba(traits = c('Wood.density', 'SLA', 'Max.height', 'Seed.mass'),
                model = 'lmer.LOGLIN.ER.AD.Tf.r.ecocode.species',
                type = 'Tf',
-               dir.root = git.root(),
+               dir.root = path.root,
                list.res = list.all.results.biomes.id)
 
 
+plot.growth.ba(traits = c('Wood.density', 'SLA', 'Max.height', 'Seed.mass'),
+               model = 'lmer.LOGLIN.ER.AD.Tf.r.ecocode.species',
+               type = 'Tn',
+               dir.root = path.root,
+               list.res = list.all.results.biomes.id)
+
+plot.growth.ba(traits = c('Wood.density', 'SLA', 'Max.height', 'Seed.mass'),
+               model = 'lmer.LOGLIN.ER.AD.Tf.r.ecocode.species',
+               type = 'Tabs',
+               dir.root = path.root,
+               list.res = list.all.results.biomes.id)
+
+## TODO WHY Tabs so weird for Wood.density ?????? do matrix plot !!!
+
 ##+ Short name for biomes, echo = FALSE, results = 'hide'
 names.biomes <- c('Subtrop', 'Temp grassland', 'Medit', 'Temp forest',
                   'Boreal', 'Temp rain forest',
@@ -190,6 +204,24 @@ names.biomes <- c('Subtrop', 'Temp grassland', 'Medit', 'Temp forest',
 
 
 ##+ Fig3, fig.cap='**Effect size parameters with data re-sampled per ecocode**', fig.width=10, fig.height=5, echo = FALSE
+plot.param(list.all.results.biomes.id ,
+               model = 'lmer.LOGLIN.ER.AD.Tf.r.ecocode.species',
+               traits = c('Wood.density', 'SLA', 'Max.height'),
+               param.vec = c("Tf","sumBn", "sumTfBn",
+                              "sumTnBn", "sumTnTfBn.abs"),
+               param.names = c(expression(paste("Direct trait effect ",
+                                   (m[1] %*% t[f]))),
+                               expression(paste('Comp mean ', (c[0]))),
+                               expression(paste('Compet response ',
+                                   (c[r] %*% t[f]))),
+                               expression(paste('Compet effect ',
+                                   (c[e] %*% t[n]))),
+                               expression(paste('Limit simil ',
+                                   (c[l] %*% abs(t[n] - t[f]))))) ,
+               col.vec =  fun.col.pch.biomes()$col.vec,
+               pch.vec =  fun.col.pch.biomes()$pch.vec,
+               names.bio = names.biomes ,
+               xlim = c(-0.3, 0.23))
 
 
 pdf('../../figs/param_all.pdf',
diff --git a/docs/results_knitr/quick.report.md b/docs/results_knitr/quick.report.md
index def6465e35ce6cde149efeecdfe306f9aa33b03d..c95f8ebae1c70e36c5fb819c38da94b6115c90c5 100644
--- a/docs/results_knitr/quick.report.md
+++ b/docs/results_knitr/quick.report.md
@@ -9,6 +9,25 @@ opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
 ```
 
 
+## ```{r options-chunk}
+## opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
+## ```
+##+ This deals with some path issues, echo = FALSE, results = 'hide'
+git.root <- function() {
+    system("git rev-parse --show-toplevel", intern=TRUE)
+}
+source.root <- function(filename) {
+    source(file.path(git.root(), filename), chdir=TRUE)
+}
+readRDS.root <- function(filename) {
+    readRDS(file.path(git.root(), filename))
+}
+
+##+ Load script, echo = FALSE, results = 'hide', message=FALSE
+path.root <- git.root()
+source.root("R/analysis/lmer.output-fun.R")
+source.root("R/analysis/lmer.run.R")
+source.root("R/utils/plot.R")
 
 
 # Introduction
diff --git a/scripts/process.data/explore.processed.data.report.R b/scripts/process.data/explore.processed.data.report.R
index 48035eaeca4b88dfe10516d3d0c34ac7f0a7dc24..9cec18d33423d3e57e216330009c22e324bfd218 100644
--- a/scripts/process.data/explore.processed.data.report.R
+++ b/scripts/process.data/explore.processed.data.report.R
@@ -15,6 +15,33 @@ source("R/analysis/lmer.run.R")
 library(data.table)
 data.all <-  readRDS(file.path('output', 'processed', "data.all.no.log.rds"))
 
+
+data.BA.G <- filter(data.all, BA.G < 50 & BA.G >0 & !is.na(BA.G) & BATOT < 150 & !is.na(BATOT))
+a <- fun.hexbin.with.smooth.ggplot(data.BA.G$BATOT, data.BA.G$BA.G,
+                                   'BATOT', 'BA.G')
+b <- fun.hexbin.with.smooth.ggplot(data.BA.G$D, data.BA.G$BA.G,
+                                   'D', 'BA.G')
+library(ggplot2)
+ multiplot(a, b,cols=2)
+
+x11()
+par(mfrow = c(1, 2))
+fun.boxplot.breaks(data.BA.G$BATOT, data.BA.G$BA.G, add = FALSE)
+fun.boxplot.breaks(data.BA.G$D, data.BA.G$BA.G, add = FALSE)
+
+
+x11()
+data.G <- filter(data.all, G < 10.5 & G >0 & !is.na(G) & BATOT < 150 & !is.na(BATOT))
+a <- fun.hexbin.with.smooth.ggplot(data.G$BATOT, data.G$G,
+                                   'BATOT', 'G')
+b <- fun.hexbin.with.smooth.ggplot(data.G$D, data.G$G,
+                                   'D', 'G')
+ multiplot(a, b,cols=2)
+x11()
+par(mfrow = c(1, 2))
+fun.boxplot.breaks(data.G$BATOT, data.G$G, add = FALSE)
+fun.boxplot.breaks(data.G$D, data.G$G, add = FALSE)
+
 ## ## get WWF biomes
 ## source('R/utils/ecoregions.R')
 ## biomes.wwf <- GetBiomes(data.all$Lon, data.all$Lat, data = fun.load.biomes.code())
diff --git a/scripts/process.data/remove.out.R b/scripts/process.data/remove.out.R
index b1644feacccc2d6dacbf1624addb35b58e9f36da..71bfc5dd8036b4f5a227a7a0992c1b8a92dc756b 100644
--- a/scripts/process.data/remove.out.R
+++ b/scripts/process.data/remove.out.R
@@ -31,8 +31,6 @@ data.all <- fun.reform.data.and.remove.outlier(data.all, err.limit = 4, select.o
 
 gc()
 saveRDS(data.all, 'output/processed/data.all.log.rds')
-## fun.write.big.csv(data.all,
-##                   file = file.path(filedir, "data.all.log.csv"))
 
 rm(data.all)
 gc()
diff --git a/scripts/process.data/summarise.data.R b/scripts/process.data/summarise.data.R
index 91ef4d5e180736e7fd3630db9e905c245f3d505f..f0d99cf3c492677328e9f824fa1bb06750f7368c 100644
--- a/scripts/process.data/summarise.data.R
+++ b/scripts/process.data/summarise.data.R
@@ -43,3 +43,46 @@ data.all.clim.lat.lon <- data.all[!duplicated(data.all$XY),
 write.csv(data.all.clim.lat.lon, file = 'output/processed/all.sites.clim.csv',
           row.names = FALSE)
                                  
+
+####################
+####################
+### TABLE FOR SUPPL MAT PAPER
+
+library(dplyr)
+
+data.set <- 
+group_by(data.all, set) %>%
+      summarise(
+          BATOT = median(BATOT, na.rm = TRUE),
+          count = n(),
+          sp.count = length(unique (sp.name)),
+          plot.count = length(unique (plot)),
+          perc.angio = sum(Phylo.group == 'Angiosperm' &
+                           !is.na(Phylo.group))/count, 
+          perc.EV = sum(Pheno.T == 'EV' & !is.na(Pheno.T))/count, 
+          perc.Leaf.N = sum(!is.na(Leaf.N.focal))/count, 
+          perc.Seed.mass = sum(!is.na(Seed.mass.focal))/count, 
+          perc.SLA = sum(!is.na(SLA.focal))/count, 
+          perc.Wood.density = sum(!is.na(Wood.density.focal))/count, 
+          perc.Max.height = sum(!is.na(Max.height.focal))/count,
+          perc.biomes.Boreal.Forest =  sum(biomes == 'Boreal Forest' &
+                                               !is.na(biomes))/count,
+          perc.biomes.SubT.Desert =  sum(biomes == 'Subtropical desert' &
+                                             !is.na(biomes))/count,
+          perc.biomes.Temp.Forest =  sum(biomes == 'Temperate Forest' &
+                                             !is.na(biomes))/count,
+          perc.biomes.Temp.Grass =  sum(biomes == 'Temperate grassland desert' &
+                                            !is.na(biomes))/count,
+          perc.biomes.Temp.Rain.Forest =  sum(biomes == 'Temperate rain forest'
+              & !is.na(biomes))/count,
+          perc.biomes.Trop.Forest =  sum(biomes == 'Tropical forest savanna'
+              & !is.na(biomes))/count,
+          perc.biomes.Trop.Rain.Forest =  sum(biomes == 'Tropical rain forest'
+              & !is.na(biomes))/count,
+          perc.biomes.Tundra =  sum(biomes == 'Tundra' & !is.na(biomes))/count,
+          perc.biomes.Wood.Shrub =  sum(biomes == 'Woodland shrubland'
+              & !is.na(biomes))/count
+      )
+
+write.csv(data.set, file = 'output/data.set.csv',
+           row.names = FALSE)