diff --git a/R/analysis/jags.run.R b/R/analysis/jags.run.R
index 1eec87bc9b27fe1ba7fab92482ce8fd1ab7a318f..db7ae286ac9d3a163df9aaf1485cd0abbb0e2df4 100644
--- a/R/analysis/jags.run.R
+++ b/R/analysis/jags.run.R
@@ -17,7 +17,7 @@ model.files.jags.Tf.2 <-
 
 fun.generate.init.one.param <- function(i, pars, list.jags,chain, chains.v){
 if(grepl('sigma',names(pars)[i])){
-  a <- 0.05+(chain-min(chains.v))/max(chains.v))*0.5
+  a <- 0.05+(chain-min(chains.v))/max(chains.v)*0.5
  }else{
   if(grepl('param',names(pars)[i])){
       if(grepl('logD', names(pars)[i])){
diff --git a/R/analysis/lmer.output-fun.R b/R/analysis/lmer.output-fun.R
index 4d48e2b3acc0cd602706701b7a9ee48332925bc4..1dc8b5cea62fb1cd0db2544a57129ec229329834 100644
--- a/R/analysis/lmer.output-fun.R
+++ b/R/analysis/lmer.output-fun.R
@@ -46,7 +46,6 @@ summarise.lmer.output.list <- function(f ){
 		    lmer.summary = summarise.lmer.output( output.lmer),
                     terms = terms(output.lmer),
                     vcov = vcov(output.lmer),
-                    re1 = BLUP.CI(output.lmer),
                     relgrad = relgrad,
                     list.sd = list.sd)
     }else{
@@ -74,7 +73,6 @@ summarise.lmer.output.all.list <- function(f ){
                                                               model$var.BLUP),
                     terms = terms(output.lmer),
                     vcov = vcov(output.lmer),
-                    re1 = BLUP.CI(output.lmer),
                     relgrad = relgrad,
                     list.sd = list.sd)
     }else{
@@ -226,7 +224,7 @@ ql <- (dat.q[[paste0('ql.', trait)]] - dat.sd[[paste0('mean.', trait)]])/
     dat.sd[[paste0('sd.', trait)]]
 qh <- (dat.q[[paste0('qh.', trait)]] - dat.sd[[paste0('mean.', trait)]])/
     dat.sd[[paste0('sd.', trait)]]
-return(list(ql = ql, qh = qh))
+return(list(ql = ql, qh = qh, ql.o = dat.q[[paste0('ql.', trait)]], qh.o =  dat.q[[paste0('qh.', trait)]]))
 }
 
 get.predict.var.scaled <- function(trait, dir.root, log.TF = FALSE, N.pred = 100){
@@ -248,6 +246,27 @@ seq.BATOT <- seq(from = 0,
 return(list(trait.quant, seq.BATOT))
 }
 
+fun.generate.pred.param.dat <-  function(type, list.sd, Tf.low, Tf.high, seq.sumBn, N.pred = 100){
+    Tf.mean <- 0
+    D.mean <-  0
+    sd_sumBn <- list.sd$sd.sumBn
+    sd_sumTfBn <- list.sd$sd.sumTfBn
+    sd_sumTnBn <- list.sd$sd.sumTnBn
+    sd_sumTnTfBn.abs <- list.sd$sd.sumTnTfBn.abs
+    mean.sumBn <- 1#mean(seq.sumBn)
+    print(mean.sumBn)
+    seq.Tf <-  seq(from = Tf.low, to = Tf.high, length.out = N.pred)
+    df <- data.frame('logG' =  rep(0 , N.pred),
+                  'logD' = rep(D.mean, N.pred),
+                  'Tf' =seq.Tf,
+                  'sumBn' = rep(mean.sumBn, N.pred)/sd_sumBn,
+                  'sumTfBn' = seq.Tf*mean.sumBn/sd_sumTfBn,
+                  'sumTnBn' = seq.Tf*mean.sumBn/sd_sumTnBn,
+                  'sumTnTfBn.abs' = abs(seq.Tf-Tf.low)*
+                                    mean.sumBn/sd_sumTnTfBn.abs)
+    return(df)
+}
+
 fun.generate.pred.dat <-  function(type, list.sd, Tf.low, Tf.high, seq.sumBn){
 
     Tf.mean <- 0
@@ -377,6 +396,34 @@ easyPredCI <- function(list.res, newdata, alpha=0.05) {
 }
 
 
+## BOLKER FUNCTION FROM RPUB
+easyPredCI.param <- function(list.res, type, newdata, alpha=0.05) {
+    if (! type %in% c('maxG', 'alphar', 'alphae', 'alphal')) stop ('error in type')
+    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)
+    sel.keep <- switch(type ,
+                       maxG = 1:2,
+                       alphar = 4:5,
+                       alphae = c(4,6),
+                       alphal = c(4,7))
+    X[, -sel.keep] <-  0
+    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,
@@ -392,6 +439,43 @@ pred.res$sumBn <-  pred.res$sumBn*list.res$list.sd$sd.sumBn
 return(pred.res)
 }
 
+
+predict.for.one.traits.3params <- function(trait, 
+                                   dir.root, list.res,
+                                   alpha = 0.05){
+list.var <- get.predict.var.scaled(trait, dir.root)
+new.data <- fun.generate.pred.param.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.max <- easyPredCI.param(list.res, type = 'maxG', new.data, alpha)
+pred.res.max$Tf <-  seq(from = list.var[[1]][['ql.o']],
+                       to = list.var[[1]][['qh.o']],
+                       length.out = 100)
+pred.res.max$param.type <- 'maxG'
+pred.res.ar <- easyPredCI.param(list.res, type = 'alphar', new.data, alpha)
+pred.res.ar$Tf <-  seq(from = list.var[[1]][['ql.o']],
+                       to = list.var[[1]][['qh.o']],
+                       length.out = 100)
+pred.res.ar$param.type <- 'alphar'
+pred.res.al <- easyPredCI.param(list.res, type = 'alphal', new.data, alpha)
+pred.res.al$Tf <-  seq(from = list.var[[1]][['ql.o']],
+                       to = list.var[[1]][['qh.o']],
+                       length.out = 100)
+pred.res.al$param.type <- 'alphal'
+pred.res.ae <- easyPredCI.param(list.res, type = 'alphae', new.data, alpha)
+pred.res.ae$Tf <-  seq(from = list.var[[1]][['ql.o']],
+                       to = list.var[[1]][['qh.o']],
+                       length.out = 100)
+pred.res.ae$param.type <- 'alphae'
+## pred.res.ae$pred <- -pred.res.ae$pred
+## pred.res.ae$lwr <- -pred.res.ae$lwr
+## pred.res.ae$upr <- -pred.res.ae$upr
+
+return(rbind(pred.res.max, pred.res.ar, pred.res.ae, pred.res.al))
+}
+
+    
 # turn pred log(BA.G) in BA.G
 inv.link.BA.G <-  function(pred, sd.BA.G, mean.BA.G, min.BA.G = 40){
 return(exp(pred * sd.BA.G + mean.BA.G) - min.BA.G -1)
@@ -465,6 +549,26 @@ dat.res <- change.traits.levels(dat.res, traits)
 return(dat.res)
 }
 
+fun.pred.BA.l.and.h.all.traits.3params <- function(traits, model, dir.root,
+                                           list.res, N.pred = 100,
+                                           data.type){
+list.df <- vector('list')
+for (i in traits){
+    list.temp <- list.res[[paste(data.type, "_", i ,
+                                 "_", model,
+                                 sep = '')]]
+    list.df[[i]] <- predict.for.one.traits.3params(trait = i, 
+                                   dir.root, list.temp,
+                                   alpha = 0.05)
+    list.df[[i]]$traits <-  i
+    }
+dat.res <- do.call('rbind', list.df)
+
+dat.res <- change.traits.levels(dat.res, traits)
+return(dat.res)
+}
+
+
 change.traits.levels <-  function(df, traits,
                                traits.names = fun.traits.names()){
 df$traits <- factor(df$traits, levels = traits)
diff --git a/docs/paper/paper.md b/docs/paper/paper.md
index 6a928a3789989722daf4c0d012aaf9fb160382d4..8c8fb8b5b03025f45143f1e277fca35903ae8f82 100644
--- a/docs/paper/paper.md
+++ b/docs/paper/paper.md
@@ -1,23 +1,19 @@
 
 # Summary paragraph outline (204 /  ideally of about 200 words, but certainly no more than 300 words)
  
-Competition is key to understand and predict the dynamics
-of plant community composition. In terrestrial
+Competition is a key process for understanding and predicting community dynamics. In terrestrial
 vegetation, where plants strongly modify the environment in their
-immediate neighbourhood, competition is conspusious but our ability to predict its consequences on plant performances is extremely limited. Predicting competition via phenotypic traits may be
-simpler and more general than via competition coefficients between
-each pair of species, an intractable approach at global scale. Here
+immediate neighbourhood, competition is conspicuous but our ability to predict its consequence on plant performances is limited. Predicting competition via phenotypic traits may be a powerful approach because traits reflect generalizable trade-offs that govern fitness differences among species under varying conditions. Here
 for the first time we show how three functional traits - wood density,
 specific leaf area and maximum height - have globally consistent
 influences on growth and competition. Data are from forest inventories
 monitoring growth for millions of trees throughout the world. Traits
-had strong effects on maximum growth rates of species. Traits of focal
-species also influenced their competitive response. Traits of
-competitor species influenced their competitive effect. Smaller than
+had strong effects on maximum growth rates of species. Traits of
+species influenced both their competitive response and competitive effect. Smaller than
 these effects, but still detectable, was a reduction in competition
 when traits were less similar between the focal plant and its
 competitors. Trait values that conferred stronger tolerance to
-competition generally also rendered species slower growing in absence
+competition generally also rendered species slower growing in the absence
 of competition. This is an important trade-off to demonstrate at
 global scale because it is a classical hypothesis for successional
 coexistence of species in forest ecosystems.
@@ -28,10 +24,9 @@ Individuals interact in a myriad of different ways in ecological
 communities. These interactions are crucial to understand and predict species composition and its
 dynamics over time. Each individual modifies their immediate
 environment and thus influences the performance of neighbouring
-individuals. Negative influences are called competition and positive
-influences  facilitation[@keddy_competition_2001].  Competition is
+individuals.  Competition is
 especially important for vegetation on land because in most vegetation
-types depletion of light, water and nutrients is substantial. There
+types depletion of light, water and nutrients is substantial[@keddy_competition_2001]. There
 have been many studies on competition among
 plants[@goldberg_patterns_1992; @keddy_competition_2001]. These traditionally have described competition via interaction coefficients between pairs of species. But this can quickly become intractable: the number of different interactions rises as $N^2$ with the number of species
 $N$. Also this species-pair approach does not lead naturally to
@@ -40,28 +35,24 @@ continents. Modeling
 competition via phenotypic traits rather than via species might overcome these limitations and allow general
 relationships to be established at biome to global scale. However,
 available
-studies[@uriarte_trait_2010; @kunstler_competitive_2012; @hillerislambers_rethinking_2012; @lasky_trait-mediated_2014; @kraft_plant_2015] are too few and too local to allow broad generalization about how traits influence competition. Notably there is continuing debate about the relative importance of mechanisms whereby particular trait values confer competitive advantage, vs. mechanisms whereby competition is weaker when two species have dissimilar traits[@mayfield_opposing_2010]. This distinction is fundamental because if competition is driven mainly by trait similarity, this will favour coexistence of a wide spread of traits values.
+studies[@uriarte_trait_2010; @kunstler_competitive_2012; @hillerislambers_rethinking_2012; @lasky_trait-mediated_2014; @kraft_plant_2015] are too few and too local to allow broad generalization about how traits influence competition. Notably there is continuing debate about the relative importance of mechanisms whereby particular trait values confer competitive advantage, vs. mechanisms whereby competition is weaker when two species have dissimilar traits[@mayfield_opposing_2010]. This distinction is fundamental because if competition is driven mainly by trait similarity, this will favour coexistence of a wide spread of trait values, wherase if interactions are mainly driven by the competitive advantage associated with particular trait values, those trait values should dominate where competition is important.
 
-Here we quantify competition as the influence of neighbours on growth of a focal tree. Our framework is novel in two important ways: (i) competition is analysed as a function of traits rather than of species at an unprecedented scale covering all the major biomes on Earth (Fig. \ref{ilustr}a) and (ii) the influence
+Here we quantify competition as the influence of neighbours on growth of a focal tree. Our framework is novel in two important ways: (i) competition is analysed as a function of traits rather than of species at an unprecedented scale covering all the major forest biomes on Earth (Fig. \ref{ilustr}a) and (ii) the influence
 of traits on competition is partitioned among four pathways (Fig. \ref{ilustr}b,c) as
 follows. A competitive advantage for some trait values compared to
 others can arise (1) through permitting faster maximum growth in
-absence of competition[@wright_functional_2010]; (2) through better
-competitive response [@goldberg_competitive_1996], growth of species
-possessing those traits being less affected by competition from
-neighbours; or (3) through stronger competitive effect[@goldberg_competitive_1996; @gaudet_comparative_1988], species
+absence of competition[@wright_functional_2010]; (2) through stronger competitive effect[@goldberg_competitive_1996; @gaudet_comparative_1988], species
 possessing those traits reducing more strongly the growth of their
 neighbours because they are correlated with
-stronger competitive effect. Finally (4) competition can promote trait
-diversification, if decreasing trait similarity between the
-competitors and the focal tree weakens competitive
-interaction[@macarthur_limiting_1967]. These four pathways are likely
-to be connected to the key traits used to describe plant
-strategies[@uriarte_trait_2010; @kunstler_competitive_2012; @hillerislambers_rethinking_2012; @lasky_trait-mediated_2014; @kraft_plant_2015; @westoby_plant_2002; @chave_towards_2009],
-and here we dissect how wood density, specific leaf area (SLA), and maximum height affect competition among neighbouring trees[@uriarte_neighborhood_2004]. We compiled data covering all the major biomes on Earth (Fig. \ref{res2}b) for basal area growth (increase in the area of the cross section of tree trunk at 1.3 m height) of more than 3 million trees representing more than 2500 species and extracted species means traits values from either the global TRY data base[@kattge_try_2011; @niinemets_global-scale_2001] or local
+stronger competitive effect; or (3) through better
+competitive response [@goldberg_competitive_1996], growth of species
+possessing those traits being less affected by competition from
+neighbours. Finally, (4) competition can promote trait diversification, if decreasing trait similarity between neighbouring trees weakens their competitive
+interactions (*i.e.* limiting similarity)[@macarthur_limiting_1967]. Here we dissect how these four pathways are connected to three key traits that describe plant
+strategies worldwide[@uriarte_trait_2010; @kunstler_competitive_2012; @hillerislambers_rethinking_2012; @lasky_trait-mediated_2014; @kraft_plant_2015; @westoby_plant_2002; @chave_towards_2009]: wood density (an indicator of stem contruction cost and defence), specific leaf area (SLA, an indicator of leaf construction cost), and maximum height (an indicatorof access to light). We analyze basal area growth (increase in the area of the cross section of tree trunk at 1.3 m height) of more than 3 million trees in more than 140000 plots, representing more than 2500 species, covering all the major biomes of the earth (Fig. \ref{res2}b) with respect to species mean traits values extracted from the global TRY data base[@kattge_try_2011; @niinemets_global-scale_2001] and local
 data bases (see Methods). We analysed how maximum growth of each
-individual tree was reduced by the local density of competitors in its
-neighborhood (measured as the sum of basal areas of competitors in
+individual tree was reduced by the local abundance of competitors in its
+neighborhood[@uriarte_neighborhood_2004] (measured as the sum of basal areas of competitors in
 $m^2/ha$), accounting for traits of both the focal tree and its
 competitors. This analysis allowed effect sizes to be estimated for
 each of the four pathways (Fig. \ref{ilustr}c).
@@ -79,10 +70,9 @@ stronger competitive effect, or better competitive response
 order as trait effects directly on maximum growth (Extended data Table
 3; Fig \ref{res1}). Finally, a small but consistent effect showed that
 higher trait similarity between focal and neighbour species resulted
-in stronger competitive suppression of growth (Fig. \ref{res1}). This
-process is capable of promoting trait diversity at a local scale. It
-has generally been considered as the key mechanism by which traits
-affect competition, but has rarely been quantified with field
+in stronger competitive suppression of growth (Fig. \ref{res1}). This 'limiting similarity' effect
+has generally been hypothesized as the key mechanism by which traits
+affect competition, but has been rarely confirmed with field
 data[@mayfield_opposing_2010]. Our analysis shows that at global scale
 this process is present but not dominant. Analyses allowing for
 different effects among biomes did not show strong evidence for any
@@ -91,14 +81,14 @@ particular biome behaving consistently differently from the others
 may reflect fundamental differences between deciduous and evergreen
 plant strategies[@lusk_why_2008] (futher detail in Supplementary discussion).
 
-Importantly, our study also supported the idea that trait values
+Importantly, our study supports the hypothesis that trait values
 favouring high tolerance to competition or high competitive effect also render species slow growing in absence
 of competition, and that this trait-based trade-off is a consistent
 global phenomenon common to all forested biomes. This trade-off
-(Fig. \ref{res3}) is significant because it is a classical explanation
+(Fig. \ref{res3}) is a classical explanation
 for successional coexistence of species in
 forests[@rees_long-term_2001]. Although confidence intervals were
-wide, trade-off was present for all three traits (crossover between
+wide, trade-offs were present for all three traits (crossover between
 high and low trait values in \ref{res3}), and the directions of trait-effects underpinning them agreed well with existing literature (further detail in Supplementary Discussion). High wood density was associated with slow potential growth rate but high tolerance to competition (Fig. \ref{res1}), in
 agreement with shade-tolerant species having high wood
 density[@wright_functional_2010]. High SLA
diff --git a/scripts/analysis/results.fig.R b/scripts/analysis/results.fig.R
index 685e581b84734d5043b32b6f908f317ed5d68ce4..b5d7634352e24c94be9d746f9e88b73c40980c8e 100644
--- a/scripts/analysis/results.fig.R
+++ b/scripts/analysis/results.fig.R
@@ -284,6 +284,45 @@ plot.growth.ba(traits = c('Wood.density', 'SLA', 'Max.height'),
                labels.leg = c('High trait value', 'Low trait value'))
 dev.off()
 
+
+data.param <- fun.pred.BA.l.and.h.all.traits.3params(traits = c('Wood.density', 'SLA', 'Max.height'),
+                                                     model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species',
+                                                     dir.root = '.',
+                                                     list.res = list.all.results.set,
+                                                     data.type = 'simple')
+
+
+df <- as.data.frame(data.param)
+df$param.type <- factor(df$param.type)
+df$traits <- factor(df$traits)
+levels(df$traits) <- c("'Wood density (mg/mm3)'",
+                       "'Specific leaf area (mm2/mg)'",
+                       "'Maximum height (m)'")
+levels(df$param.type) <- c('"Effect "alpha[e]', '"Similarity" alpha[s]',
+                           '"Response "alpha[r]', '"Direct m"[1]')
+levels(df$param.type) <- c('alpha[e]', 'alpha[s]', 'alpha[r]', '"m"[1]')
+
+df$param.type <- factor(df$param.type,levels(df$param.type)[c(4,3,1,2)])
+
+
+pdf('figs/figres4.pdf')
+library(ggplot2)
+cols <- fun.col.param()[c(2,5,4,6)]
+names(cols) <- NA
+ggplot(df, aes(x = Tf, y = pred, colour = param.type)) +
+  geom_line(aes(x = Tf, y = pred, colour = param.type)) +
+  scale_color_manual(values = c( "#e41a1c", "#4daf4a", "#984ea3", "#ff7f00" )) +
+  geom_ribbon(aes(ymin=lwr, ymax=upr, fill = param.type,
+                  linetype=NA, show_guide=FALSE), alpha=0.2) +
+    scale_fill_manual(values =  c( "#e41a1c", "#4daf4a", "#984ea3", "#ff7f00" ), guide = FALSE) +    
+  facet_grid(param.type ~ traits, scales = "free", labeller = label_parsed)+  theme_simple() + guides(colour=FALSE)+
+  ylab('Parameters')+xlab('Traits')+
+      theme(strip.text.x = element_text(size = 10))+
+      theme(strip.text.y = element_text(size = 17))
+dev.off()
+
+
+
 plot.growth.ba(traits = c('Wood.density', 'SLA', 'Max.height'),
                model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species',
                type = 'Tabs', data.type = 'simple',
@@ -291,6 +330,8 @@ plot.growth.ba(traits = c('Wood.density', 'SLA', 'Max.height'),
                list.res = list.all.results.set,
                labels.leg = c('High trait value', 'Low trait value'))
 
+
+
 mat.R2c <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
                                      extract.R2c, list.res = list.all.results.set,
                                      model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species'))
diff --git a/scripts/process.data/merge.all.processed.data.R b/scripts/process.data/merge.all.processed.data.R
index 020e5c9f5f5c736b4119af283d28dead501460df..26730a5175fc27bb17a7d6c4aec3d8cf9aac7863 100644
--- a/scripts/process.data/merge.all.processed.data.R
+++ b/scripts/process.data/merge.all.processed.data.R
@@ -37,18 +37,18 @@ saveRDS(data.all, 'output/processed/data.all.global.t.rds')
 library(dplyr)
 
 data.quant.traits <- summarise(data.all,
-          ql.SLA = quantile(SLA.focal, probs = 0.05, na.rm = TRUE),
-          qh.SLA = quantile(SLA.focal, probs = 0.95, na.rm = TRUE),
-          ql.Leaf.N = quantile(Leaf.N.focal, probs = 0.05, na.rm = TRUE),
-          qh.Leaf.N = quantile(Leaf.N.focal, probs = 0.95, na.rm = TRUE),
-          ql.Wood.density = quantile(Wood.density.focal, probs = 0.05, na.rm = TRUE),
-          qh.Wood.density = quantile(Wood.density.focal, probs = 0.95, na.rm = TRUE),
-          ql.Max.height = quantile(Max.height.focal, probs = 0.05, na.rm = TRUE),
-          qh.Max.height = quantile(Max.height.focal, probs = 0.95, na.rm = TRUE),
-          ql.Seed.mass = quantile(Seed.mass.focal, probs = 0.05, na.rm = TRUE),
-          qh.Seed.mass = quantile(Seed.mass.focal, probs = 0.95, na.rm = TRUE),
-          ql.BATOT = quantile(BATOT, probs = 0.05, na.rm = TRUE),
-          qh.BATOT = quantile(BATOT, probs = 0.95, na.rm = TRUE),
+          ql.SLA = quantile(SLA.focal, probs = 0.01, na.rm = TRUE),
+          qh.SLA = quantile(SLA.focal, probs = 0.999, na.rm = TRUE),
+          ql.Leaf.N = quantile(Leaf.N.focal, probs = 0.001, na.rm = TRUE),
+          qh.Leaf.N = quantile(Leaf.N.focal, probs = 0.999, na.rm = TRUE),
+          ql.Wood.density = quantile(Wood.density.focal, probs = 0.001, na.rm = TRUE),
+          qh.Wood.density = quantile(Wood.density.focal, probs = 0.999, na.rm = TRUE),
+          ql.Max.height = quantile(Max.height.focal, probs = 0.001, na.rm = TRUE),
+          qh.Max.height = quantile(Max.height.focal, probs = 0.999, na.rm = TRUE),
+          ql.Seed.mass = quantile(Seed.mass.focal, probs = 0.001, na.rm = TRUE),
+          qh.Seed.mass = quantile(Seed.mass.focal, probs = 0.999, na.rm = TRUE),
+          ql.BATOT = quantile(BATOT, probs = 0.001, na.rm = TRUE),
+          qh.BATOT = quantile(BATOT, probs = 0.999, na.rm = TRUE),
           qm.D = quantile(D, probs = 0.5, na.rm = TRUE)
           )
 ## in global
@@ -78,18 +78,18 @@ rm( data.all.I, data.all.B)
 gc()
 saveRDS(data.all, 'output/processed/data.all.no.log.t.rds')
 data.quant.traits <- summarise(data.all,
-          ql.SLA = quantile(SLA.focal, probs = 0.05, na.rm = TRUE),
-          qh.SLA = quantile(SLA.focal, probs = 0.95, na.rm = TRUE),
-          ql.Leaf.N = quantile(Leaf.N.focal, probs = 0.05, na.rm = TRUE),
-          qh.Leaf.N = quantile(Leaf.N.focal, probs = 0.95, na.rm = TRUE),
-          ql.Wood.density = quantile(Wood.density.focal, probs = 0.05, na.rm = TRUE),
-          qh.Wood.density = quantile(Wood.density.focal, probs = 0.95, na.rm = TRUE),
-          ql.Max.height = quantile(Max.height.focal, probs = 0.05, na.rm = TRUE),
-          qh.Max.height = quantile(Max.height.focal, probs = 0.95, na.rm = TRUE),
-          ql.Seed.mass = quantile(Seed.mass.focal, probs = 0.05, na.rm = TRUE),
-          qh.Seed.mass = quantile(Seed.mass.focal, probs = 0.95, na.rm = TRUE),
-          ql.BATOT = quantile(BATOT, probs = 0.05, na.rm = TRUE),
-          qh.BATOT = quantile(BATOT, probs = 0.95, na.rm = TRUE),
+          ql.SLA = quantile(SLA.focal, probs = 0.001, na.rm = TRUE),
+          qh.SLA = quantile(SLA.focal, probs = 0.999, na.rm = TRUE),
+          ql.Leaf.N = quantile(Leaf.N.focal, probs = 0.001, na.rm = TRUE),
+          qh.Leaf.N = quantile(Leaf.N.focal, probs = 0.999, na.rm = TRUE),
+          ql.Wood.density = quantile(Wood.density.focal, probs = 0.001, na.rm = TRUE),
+          qh.Wood.density = quantile(Wood.density.focal, probs = 0.999, na.rm = TRUE),
+          ql.Max.height = quantile(Max.height.focal, probs = 0.001, na.rm = TRUE),
+          qh.Max.height = quantile(Max.height.focal, probs = 0.999, na.rm = TRUE),
+          ql.Seed.mass = quantile(Seed.mass.focal, probs = 0.001, na.rm = TRUE),
+          qh.Seed.mass = quantile(Seed.mass.focal, probs = 0.999, na.rm = TRUE),
+          ql.BATOT = quantile(BATOT, probs = 0.001, na.rm = TRUE),
+          qh.BATOT = quantile(BATOT, probs = 0.999, na.rm = TRUE),
           qm.D = quantile(D, probs = 0.5, na.rm = TRUE)
           )
 ## in log10