Commit e93a630d authored by kunstler's avatar kunstler
Browse files

new version of paper and fixed launch

parent 7674b82c
......@@ -577,8 +577,12 @@ for (i in traits){
yaxt = 'n', xlab = NA, ylab = NA,
pch = 16 , cex = 2, cex.lab = 1.7,cex.axis = 1.5,
ylim = range(1:length(param.vec)), ...)
if(i == traits[2]) mtext('Standardized coefficients', side=1, cex =1.7,
if(length(traits)>1){
if(i == traits[2]) mtext('Standardized coefficients', side=1, cex =1.7,
line = 4)
}else{mtext('Standardized coefficients', side=1, cex =1.7,
line = 4)
}
mtext(traits.names[i], side=3, cex =1.7, line = 1)
box(lwd= 2)
......@@ -653,6 +657,7 @@ for (i in traits[traits.print]){
names(param.std) <- names(list.temp$fixed.coeff.E)
param.std <- param.std[param.vec]
param.BLUP <- list.temp$set.BLUP
if(length(traits) >1){
if(i == traits[1]) {
par(mai=c(1.2, big.m,0.6,0), xpd = TRUE)
}else{
......@@ -661,13 +666,45 @@ for (i in traits[traits.print]){
if(i == traits[length(traits)]) {
par(mai=c(1.2,0,0.6,small.m), xpd = TRUE)
}
plot(param.mean[param.print], (1:length(param.vec))[param.print],
if(i == traits[2]) mtext('Standardized coefficients', side=1, cex =1.7,
line = 4)
}
if(length(traits) ==1 ) {
par(mai=c(1.2, big.m,0.6,small.m), xpd = TRUE)
mtext('Standardized coefficients', side=1, cex =1.7,
line = 4)
lapply(1:length(param.vec),
fun.axis.one.by.one,
side = 2,
labels = param.names,
cols.vec = col.names[param.vec])
mtext("Max growth", side=2, at = 4.75, cex =1.6,
line = 17.9, col = '#e41a1c')
lines(c(-1.07, -1.07), c(4.7, 5.25), col = '#e41a1c',
lwd = 2.5)
mtext("Competition", side=2, at = 2.5, cex =1.6,
line = 17.9, col = '#377eb8')
lines(c(-1.07, -1.07), c(0.72, 4.28), col = '#377eb8',
lwd = 2.5)
## mtext("Max growth", side=2, at = 5.5, cex =1.6,
## line = 17.5, col = '#e41a1c')
## lines(c(-1.07, -1.07), c(4.75, 6.15), col = '#e41a1c',
## lwd = 2.5)
## mtext("Competition", side=2, at = 2.5, cex =1.6,
## line = 17.5, col = '#377eb8')
## lines(c(-1.07, -1.07), c(0.85, 4.15), col = '#377eb8',
## lwd = 2.5)
}
plot(param.mean[param.print], (1:length(param.vec))[param.print],
yaxt = 'n', xlab = NA, ylab = NA,
pch = 16, cex = 2, cex.lab = 1.7, cex.axis = 1.5,
ylim = range(1:length(param.vec)), ...)
mtext(traits.names[i], side=3, cex =1.7, line = 1)
if(i == traits[2]) mtext('Standardized coefficients', side=1, cex =1.7,
line = 4)
box(lwd= 2)
lines(c(0, 0), c(1-0.2, length(param.vec)+0.2))
if(i == traits[1]) {lapply(1:length(param.vec),
......@@ -675,10 +712,18 @@ for (i in traits[traits.print]){
side = 2,
labels = param.names,
cols.vec = col.names[param.vec])
mtext("Max growth", side=2, at = 5.5, cex =1.6, line = 17.5, col = '#e41a1c')
lines(c(-1.07, -1.07), c(4.75, 6.15), col = '#e41a1c', lwd = 2.5)
mtext("Competition", side=2, at = 2.5, cex =1.6, line = 17.5, col = '#377eb8')
lines(c(-1.07, -1.07), c(0.85, 4.15), col = '#377eb8', lwd = 2.5)
mtext("Max growth", side=2, at = 4.95, cex =1.6,
line = 17.9, col = '#e41a1c')
lines(c(-1.07, -1.07), c(4.5, 5.28), col = '#e41a1c',
lwd = 2.5)
mtext("Competition", side=2, at = 2.5, cex =1.6,
line = 17.9, col = '#377eb8')
lines(c(-1.07, -1.07), c(0.82, 4.28), col = '#377eb8',
lwd = 2.5)
## mtext("Max growth", side=2, at = 5.5, cex =1.6, line = 17.5, col = '#e41a1c')
## lines(c(-1.07, -1.07), c(4.75, 6.15), col = '#e41a1c', lwd = 2.5)
## mtext("Competition", side=2, at = 2.5, cex =1.6, line = 17.5, col = '#377eb8')
## lines(c(-1.07, -1.07), c(0.85, 4.15), col = '#377eb8', lwd = 2.5)
}
fun.plot.error.bar.horiz(param.mean[param.print],
(1:length(param.vec))[param.print],
......@@ -865,10 +910,14 @@ for (i in traits){
labels = param.names,
cols.vec = col.names[param.vec],
cex.axis = 2.1)
mtext("Max growth", side=2, at = 4, cex =1.6, line = 17.9, col = '#e41a1c')
lines(c(-0.645, -0.645), c(3.7, 4.3), col = '#e41a1c', lwd = 2.5)
mtext("Competition", side=2, at = 2, cex =1.6, line = 17.9, col = '#377eb8')
lines(c(-0.645, -0.645), c(0.72, 3.28), col = '#377eb8', lwd = 2.5)
mtext("Max growth", side=2, at = 4, cex =1.6,
line = 17.9, col = '#e41a1c')
lines(c(-0.645, -0.645), c(3.7, 4.3), col = '#e41a1c',
lwd = 2.5)
mtext("Competition", side=2, at = 2, cex =1.6,
line = 17.9, col = '#377eb8')
lines(c(-0.645, -0.645), c(0.72, 3.28), col = '#377eb8',
lwd = 2.5)
}
fun.plot.error.bar.horiz(param.mean,
seq.jitter+n.vars,
......
......@@ -28,28 +28,16 @@ run.model.for.set.one.trait <- function(model.file, fun.model, trait,
path.model <- "R/analysis/model.lmer"
model.files.lmer.Tf.1 <- file.path(path.model,
c("model.lmer.LOGLIN.ER.AD.Tf.fixed.biomes.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.r.ecocode.fixed.biomes.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.fixed.species.R"))
model.files.lmer.Tf.2 <- file.path(path.model,
c("model.lmer.LOGLIN.ER.AD.Tf.r.biomes.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.r.ecocode.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.r.ecocode.biomes.species.R"))
model.files.lmer.Tf.3 <- file.path(path.model,
c("model.lmer.LOGLIN.ER.AD.Tf.r.set.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species.R"))
model.files.lmer.Tf.4 <- file.path(path.model,
model.files.lmer.Tf.2 <- file.path(path.model,
c("model.lmer.LOGLIN.ER.AD.Tf.r.tree.id.set.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.r.tree.id.set.biomes.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.r.tree.id.set.fixed.biomes.species.R"))
model.files.lmer.Tf.Multi <- file.path(path.model,
c("model.lmer.LOGLIN.ER.AD.Tf.Multi.r.ecocode.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.Multi.r.set.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.Multi.r.ecocode.biomes.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.Multi.r.biomes.species.R"))
c("model.lmer.LOGLIN.ER.AD.Tf.Multi.r.set.species.R",
"model.lmer.LOGLIN.ER.AD.Tf.Multi.r.set.fixed.biomes.species.R"))
call.lmer.and.save <- function(formula, df.lmer, path.out,
......@@ -163,7 +151,7 @@ load.data.for.lmer <- function(trait, data.type,
df <- readRDS(file.path(base.dir,paste('data', 'Multi', data.type, 'rds',
sep = '.')))
}else{
df <- readRDS( file.path(base.dir,paste('data', trait, 'simple', 'rds',
df <- readRDS( file.path(base.dir,paste('data', trait, data.type, 'rds',
sep = '.')))
}
df <- mutate(df,sp.name = ifelse(is.na(sp.name), 'missing.sp',
......@@ -525,7 +513,7 @@ abs.CWM.tntf <- paste(trait, "abs.CWM", 'fill', sep = ".")
tf <- paste(trait, "focal", sep = ".")
BATOT <- "BATOT"
#= DATA LIST FOR LMER
if(data.type == 'simple') {
if(data.type == 'simple' | data.type == 'all.census') {
print('no cat')
lmer.data <- get.variables(data.tree,
BATOT,
......@@ -534,15 +522,6 @@ if(data.type == 'simple') {
tf,
ecocode.var)
}
if(data.type =='cat') {
print('cat')
lmer.data <- get.variables.cat(data.tree,
BATOT,
CWM.tn,
abs.CWM.tntf,
tf,
ecocode.var)
}
if(data.type =='Multi') {
print('Multi')
lmer.data <- get.variables.Multi(data.tree,
......
load.model <- function () {
list(name="lmer.LOGLIN.ER.AD.Tf.Multi.r.set.fixed.biomes.species",
var.BLUP = 'set.id',
lmer.formula.tree.id=formula("logG~1+(1|set.id)+(1|species.id)+(1|plot.id)+biomes.id+SLA.Tf+Wood.density.Tf+Max.height.Tf+SLA.Tf:biomes.id+Wood.density.Tf:biomes.id+Max.height.Tf:biomes.id+logD+sumBn+sumBn:biomes.id+SLA.sumTfBn+Wood.density.sumTfBn+Max.height.sumTfBn+SLA.sumTfBn:biomes.id+Wood.density.sumTfBn:biomes.id+Max.height.sumTfBn:biomes.id+SLA.sumTnBn+Wood.density.sumTnBn+Max.height.sumTnBn+SLA.sumTnBn:biomes.id+Wood.density.sumTnBn:biomes.id+Max.height.sumTnBn:biomes.id+sumTnTfBn.abs.Multi+sumTnTfBn.abs.Multi:biomes.id +(logD-1|species.id) +(sumBn-1|species.id)+(SLA.Tf-1|set.id)+(Wood.density.Tf-1|set.id)+(Max.height.Tf-1|set.id)+(sumBn-1|set.id)+(SLA.sumTfBn-1|set.id)+(Wood.density.sumTfBn-1|set.id)+(Max.height.sumTfBn-1|set.id)+(SLA.sumTnBn-1|set.id)+(Wood.density.sumTnBn-1|set.id)+(Max.height.sumTnBn-1|set.id)+(sumTnTfBn.abs.Multi-1|set.id)"))
}
all: paper.pdf extended_method.pdf extended_data.pdf
all: paper_all.pdf SupplMat.pdf extended_data.pdf paper.docx extended_method.docx SupplMat.docx
paper_all.pdf: paper.pdf extended_method.pdf
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ paper.pdf extended_method.pdf
paper.pdf: paper.md include.tex refs.bib
pandoc $< metadata.yaml --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 $@
pandoc $< metadata.yaml --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 -s -o $@
paper.docx: paper.md include.tex refs.bib
pandoc -s -S $< metadata.yaml --csl=nature.csl --filter pandoc-citeproc --bibliography=refs.bib --template=include.tex --variable mainfont="Times New Roman" --variable sansfont=Arial --variable fontsize=12pt -o paper.docx
extended_method.md: extended_method.Rmd
Rscript -e "library(knitr); knit('extended_method.Rmd', output = 'extended_method.md')"
pandoc -s -S $< metadata.yaml --csl=nature.csl --filter pandoc-citeproc --bibliography=refs.bib --template=include.tex --variable mainfont="Times New Roman" --variable sansfont=Arial --variable fontsize=12pt -s -o paper.docx
extended_method.pdf: extended_method.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 $@
......@@ -29,6 +29,9 @@ SupplMat.md: Suppl_Mat.Rmd
SupplMat.pdf: SupplMat.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 $@
SupplMat.docx: SupplMat.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 -o $@
clean:
rm -f *.pdf
rm -f *.html
......
This diff is collapsed.
% Supplementary Information
# Supplementary methods
The log transformed growth model is:
\begin{equation} \label{logG1}
\log{G_{i,f,p,s}} = \log{G_{\textrm{max} \, f,p,s}} + \gamma_f \, \log{D_{i,f,p,s}} + \sum_{c=1}^{N_p} {\alpha_{c,f} B_{c,p,s}}.
\end{equation}
To include traits effects on competition presented in Fig. 1 (main text), competitive interactions were modelled using an equation of the form:
\begin{equation} \label{alpha}
\alpha_{c,f} = \alpha_{0,f} + \alpha_r \, t_f + \alpha_i \, t_c + \alpha_s \, \vert t_c-t_f \vert
\end{equation}
where:
- $\alpha_{0,f}$ is the trait independent competition for the focal species $f$, modelled with a normally distributed random effect of species $f$ and a normally distributed random effect of data set $s$ (as $\alpha_{0,f} = \alpha_0 + \epsilon_{0, f}+ \epsilon_{\alpha_0, s}$),
- $\alpha_r$ is the **competitive response** of the focal species, i.e. change in competition response due to traits $t_f$ of the focal tree and include a normally distributed random effect of data set $s$ ($\epsilon_{\alpha_r,s}$),
- $\alpha_{i}$ is the **competitive impact**, i.e. change in competition impact due to traits $t_c$ of the competitor tree and include a normally distributed random effect of data set $s$ ($\epsilon_{\alpha_i,s}$), and
- $\alpha_s$ is the effect of **trait similarity**, i.e. change in competition due to absolute distance between traits $\vert{t_c-t_f}\vert$ and include a normally distributed random effect of data set $s$ ($\epsilon_{\alpha_s,s}$).
% Supplementary Information
When the equation \label{alpha} is developed in the competition index of equation \label{logG1} the parameters are directly related to community weighted means of the different traits variables as:
# Supplementary methods
We developed the equation of $\alpha_{c,f} = \alpha_{0,f} + \alpha_r \, t_f + \alpha_i \, t_c + \alpha_s \, \vert t_c-t_f \vert$ along with the basal area of each competitive species in the competition index to show the parameters are directly related to community weighted means of the different traits variables as:
\begin{equation} \label{alphaBA}
\sum_{c=1}^{N_p} {\alpha_{c,f} B_{c,p,s}} = \alpha_{0,f} \, B_{tot} + \alpha_r \, t_f \, B_{tot} + \alpha_i \, B_{t_c} + \alpha_s \, B_{\vert t_c - t_f \vert}
\sum_{c=1}^{N_p} {\alpha_{c,f} B_{i,c,p,s}} = \alpha_{0,f} \, B_{i,tot} + \alpha_r \, t_f \, B_{i,tot} + \alpha_i \, B_{i,t_c} + \alpha_s \, B_{i,\vert t_c - t_f \vert}
\end{equation}
Where:
$B_{tot} = \sum_{c=1}^{C_p} {B_{c}}$,
$B_{i,tot} = \sum_{c=1}^{C_p} {B_{i,c,p,s}}$,
$B_{t_c} = \sum_{c=1}^{C_p} {t_c \times B_{c}}$,
$B_{i,t_c} = \sum_{c=1}^{C_p} {t_c \times B_{i,c,p,s}}$,
and $B_{\vert t_c - t_f \vert} = \sum_{c=1}^{C_p} {\vert t_c - t_f \vert \times B_{c}}$.
$B_{i,\vert t_c - t_f \vert} = \sum_{c=1}^{C_p} {\vert t_c - t_f \vert \times B_{i,c,p,s}}$,
and $C_p$ is the number of species on the plot $p$.
## Details on sites
......@@ -57,7 +41,7 @@ replace_refs <- function(x){
dat$References <- sapply(dat$References, replace_refs)
paste_name_data <- function(df){
sprintf("## %s\n\n%s\n\n", df[["Country"]],
sprintf("### %s\n\n%s\n\n", df[["Country"]],
paste0(
llply(names(df)[-c(1)], function(x) sprintf("- %s: %s", x, df[[x]])), collapse="\n")
)
......@@ -66,11 +50,34 @@ list.t <- dlply(dat, 1, paste_name_data)
writeLines(unlist(list.t[dat[["Country"]]]))
```
## References for the data extracted from the TRY database used in this analysis
```{r refs data, echo = FALSE, results='asis'}
data.refs <-read.csv(file.path("../..", 'output', 'refsTRYtidy.csv'), stringsAsFactors = FALSE)
list.t <- lapply(as.list(data.refs$refs), function(x) paste("- ",x))
writeLines(unlist(list.t))
```
# Supplementary discussion
## Trait effects and potential mechanisms
Wood density (WD) was strongly negatively associated with maximum growth, in agreement with the idea that shade-intolerant species with low wood density have faster growth in absence of competition (in full light conditions) than shade tolerant species[@nock_wood_2009; @wright_functional_2010]. One advantage of low wood density is clearly that it is cheaper to build light than dense wood, thus for the same biomass growth a low wood density species will have a higher basal area increment than a high wood density species[@enquist_allometric_1999]. Other advantages of light wood may include higher xylem conductivity[@chave_towards_2009], though for angiosperms this is a correlated trait rather than an automatic consequence. A countervailing advantage for high wood density species was their better tolerance to competition (less growth reduction per unit of basal area of competitors), which is in line with the idea that these species are more shade tolerant[@chave_towards_2009; @nock_wood_2009; @wright_functional_2010]. This has generally been related to the higher survival associated with high wood density[@kraft_relationship_2010], via resistance to mechanical damage, herbivores and pathogens[@chave_towards_2009; @kraft_relationship_2010], but may also be connected to a lower maintenance respiration[@larjavaara_perspective_2010]. For growth, the lower respiration may lead to a direct advantage in deep shade, but the correlation might also arise through correlated selection for high survival rate and for high growth in shade. Finally, high wood density was also weakly correlated with stronger competitive effect, especially in tropical forest where the confidence interval did not span zero. This might possibly have been mediated by larger crowns (both in depth and radius)[@poorter_architecture_2006; @aiba_architectural_2009], casting a deeper shade.
SLA was positively correlated with maximum basal area growth (growth without competition). This agrees well with previous studies that reported a positive correlation between SLA and nitrogen and phosphorus concentration, and gas exchange (the 'leaf economic spectrum'[@wright_worldwide_2004]). As in previous studies[@poorter_are_2008; @wright_functional_2010], this direct effect of SLA was smaller than the effect size of wood density and had wider confidence intervals. Low SLA was also correlated with a stronger competitive effect. This may be related to a longer leaf life span characteristic of low SLA species because leaf longevity leads to a higher accumulation of leaf in the canopy and thus a higher light interception[@niinemets_review_2010].
Maximum height was weakly positively correlated with maximum growth rate (confidence intervals spanned zero except for temperate rain forest). Previous studies[@poorter_architecture_2006; @poorter_are_2008; @wright_functional_2010] found mixed support for this relationship. Possible mechanisms are contradictory: maximum height may be associated with greater access to light and thus faster growth, but at the same time life history strategies might be expected to select for slower growth in long-lived plants[@poorter_are_2008]. Maximum height was negatively correlated with tolerance to competition, in line with the idea that sub-canopy trees are more shade-tolerant[@poorter_architecture_2006]. There was however a tendency for species with tall maximum height to have stronger competitive effect (though with wider confidence intervals intercepting zero), that might be explained by greater light interception from taller trees.
Our results raised the question whether there is a coordination between trait values conferring strong competitive effect and trait values conferring high competitive tolerance. Competitive effect and response are the two central elements of the species competitive ability[@goldberg_competitive_1991]. One may expect that because of intra-specific competition, species with strong competitive effect should have evolved a high tolerance to competition. However, in agreement with previous studies[@goldberg_components_1990; @goldberg_competitive_1991; @wang_are_2010], we found little evidence for such coordination. It was present only for wood density, where high density conferred better competitive response and also stronger competitive effect (but with wide confidence intervals). For SLA there was no clear coordinations. For maximum height as explained above there was a tendency for short maximum height to lead to high tolerance to competition but to low competitive effect. This interesting because a trade-off between competitive tolerance and maximum height has been proposed as fundamental mechanisms of coexistence of species in size-structured population in the stratification theory of species coexistence[@kohyama_stratification_2009]. Finally the lack of support for coordination between response and effect is important because it means that competitive interaction is not well described as a trait hierarchy relating a focal species to its competitors (measured as $t_c -t_f$ and thus assuming $\alpha_e = \alpha_r$ as in @kunstler_competitive_2012; @kraft_functional_2014; @lasky_trait-mediated_2014). Traits of competitors alone or of focal plants alone may convey more information. If traits are strongly linked to either competitive effect or competitive response, this still means that some trait values will have an advantage in competitive interactions.
Given that the effect sizes we report for effects of traits on competitive interaction are modest, the question arises whether the three traits available to us (wood density, SLA, and maximum height) were the best candidates. It is possible that traits more directly related to mechanisms of competition -- for instance for competition for light, the leaf area index of the competitors or the compensation point at leaf or whole-plant level -- may be more powerful. It is also possible that if traits measured at the individual level were available, rather than species averages, this might strengthen predictive power[@kraft_functional_2014].
## Variations between biomes
The results were more variable for SLA than for other traits (Fig. 2 main text). The different sign for the parameter $\alpha_r$ related to the link between trait and competitive response in temperate forest biome, may be related to the high abundance of deciduous species in this biomes (see Extended data Table 1). Previous studies[@lusk_why_2008] has reported a different link between shade-tolerance and SLA for deciduous and evergreen species. The only other important differences between biomes was taiga for which the parameter relating wood density to competitive impact was positive whereas this parameter was negative in the other biomes (Fig 2 main text). We have no satisfactory explanation for this discrepancy. The number of species in this biomes is relatively limited in comparison with the other biomes and there is a high dominance of conifer species for which the range of wood density is much narrow than for the angiosperm (see Extended data Table 1).
Overall most results were rather consistent across biomes (Fig 3 main text), but some exceptions deserve comment.
Only for SLA, the sign of the effect size parameters were changing a lot between biomes (Fig. 3 main text). High SLA species tended to be more competition-tolerant (competitive response parameter $\alpha_r$) in temperate forests (confidence interval only marginally intercepted zero) while low SLA species were more competition-tolerant in tropical forests. These different outcomes may trace to the prevalence of deciduous species in temperate forests (see Extended data Table 1), because the link between shade-tolerance and SLA is different for deciduous and evergreen species[@lusk_why_2008]. In tropical forests shade-tolerant species often have long leaf lifespans, associated with low SLA. On the other hand in temperate deciduous forests the length of the growing season is fixed by temperature. Shade tolerant species cannot increase leaf longevity and instead reduce the cost of leaf production (high SLA) to offset the reduced income due to low light availability. The other noticeable difference between biomes was for taiga where the parameter relating wood density to competitive impact was positive, versus negative in the other biomes (Fig 3 main text). We do not have a mechanistic explanation to suggest for this discrepancy, but can observe that taiga has relatively few species many of which are conifers where the range of wood density is narrower than for angiosperms (see Extended data Table 1).
# References
......
......@@ -5,9 +5,9 @@
## ```
## ![Map of the plot locations of all data sets analysed. Large xy plots are represented with a large points (The data set of Panama comprise both a 50ha plot and a network of 1ha plots).](image/worldmapB.png)
## ![Map of the plot locations of all data sets analysed. LPP plots are represented with a large points and NFI plots with small points (The data set of Panama comprise both a 50ha plot and a network of 1ha plots).](image/worldmapB.png)
## \newpage
## \newpage
##+ This deals with some path issues, echo = FALSE, results = 'hide'
......@@ -25,7 +25,7 @@ readRDS.root <- function(filename) {
path.root <- git.root()
## # Data description
##+ kable2, echo = FALSE, results="asis", message=FALSE
library(pander)
......@@ -54,10 +54,18 @@ colnames(dat.2) <- var.names
dat.2 <- as.data.frame(dat.2)
rownames(dat.2) <- NULL
dat.2 <- dat.2[, 1:11]
pandoc.table(dat.2[, 1:6], caption = "Data description, with number of individual tree, species and plot in NFI data and quadrat in LPP data, and percentage of angiosperm and evergreen species.",
digits = 3, split.tables = 200, split.cells = 15)
pandoc.table(dat.2[, c(1,9:11)], caption = "Traits coverage in each sites. Percentage of species with species level trait data.",
digits = 2, split.tables = 200, split.cells = 15)
dat.2[,5:11] <- dat.2[,5:11]*100
pandoc.table(dat.2[, 1:6],
caption = "Data description, with number of individual tree, species and plot in NFI data and quadrat in LPP data, and percentage of angiosperm and evergreen species.",
digits = c(3,3,3,0,0), split.tables = 200, split.cells = 35,
justify = c('left', rep('right', 5)), keep.trailing.zeros = TRUE)
pandoc.table(dat.2[, c(1,9:11)],
caption = "Traits coverage in each sites. Percentage of species with species level trait data.",
digits = 1, split.tables = 200, split.cells = 25,
justify = c('left', rep('right', 3)),
keep.trailing.zeros = TRUE)
......@@ -66,6 +74,7 @@ source.root("R/analysis/lmer.output-fun.R")
source.root("R/analysis/lmer.run.R")
source.root("R/utils/plot.R")
## # Model results
##+ ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE
list.all.results <-
......@@ -81,18 +90,25 @@ mat.param.sd <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
mat.R2 <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.R2c, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species'))
mat.param.mean.sd <- matrix(paste0(round(mat.param, 4),
bold.index <- which(((mat.param - 1.96*mat.param.sd) >0 & mat.param > 0) |
((mat.param + 1.96*mat.param.sd) <0 & mat.param <0),
arr.ind = TRUE)
mat.param.mean.sd <- matrix(paste0(round(mat.param, 3),
' (',
round(mat.param.sd, 4),
round(mat.param.sd, 3),
')'), ncol = 3)
mat.param <- rbind(mat.param.mean.sd,
round(mat.R2, 4))
colnames(mat.param) <- c('Wood.density', 'SLA', 'Max.height')
row.names(mat.param) <- c('$\\gamma$', '$m_1$', '$alpha_0$',
colnames(mat.param) <- c('Wood density', 'SLA', 'Maximum height')
row.names(mat.param) <- c('$\\gamma$', '$m_1$', '$\\alpha_0$',
'$\\alpha_i$', '$\\alpha_r$',
'$\\alpha_s$', '$R^2$*')
##+ Table2_Effectsize, echo = FALSE, results='asis', message=FALSE
pandoc.table(mat.param, caption = "Standaridized parameters estimates and standard error (in bracket) estimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters")
pandoc.table(mat.param, caption = "Standaridized parameters estimates and standard error (in bracket) estimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters",
digits = 3, justify = c('left', rep('right', 3)),
emphasize.strong.cells = bold.index, split.tables = 200)
## \* We report the conditional $R^2$ of the models using the methods of Nakagawa, S. & Schielzeth, H. A general and simple method for obtaining R2 from generalized linear mixed-effects models. Methods in Ecology and Evolution 4, 133–142 (2013).
......@@ -5,9 +5,9 @@ opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
```
![Map of the plot locations of all data sets analysed. Large xy plots are represented with a large points (The data set of Panama comprise both a 50ha plot and a network of 1ha plots).](image/worldmapB.png)
![Map of the plot locations of all data sets analysed. LPP plots are represented with a large points and NFI plots with small points (The data set of Panama comprise both a 50ha plot and a network of 1ha plots).](image/worldmapB.png)
\newpage
\newpage
``` {r This deals with some path issues, echo = FALSE, results = 'hide'}
......@@ -27,7 +27,7 @@ path.root <- git.root()
```
# Data description
``` {r kable2, echo = FALSE, results="asis", message=FALSE}
library(pander)
......@@ -56,10 +56,18 @@ colnames(dat.2) <- var.names
dat.2 <- as.data.frame(dat.2)
rownames(dat.2) <- NULL
dat.2 <- dat.2[, 1:11]
pandoc.table(dat.2[, 1:6], caption = "Data description, with number of individual tree, species and plot in NFI data and quadrat in LPP data, and percentage of angiosperm and evergreen species.",
digits = 3, split.tables = 200, split.cells = 15)
pandoc.table(dat.2[, c(1,9:11)], caption = "Traits coverage in each sites. Percentage of species with species level trait data.",
digits = 2, split.tables = 200, split.cells = 15)
dat.2[,5:11] <- dat.2[,5:11]*100
pandoc.table(dat.2[, 1:6],
caption = "Data description, with number of individual tree, species and plot in NFI data and quadrat in LPP data, and percentage of angiosperm and evergreen species.",
digits = c(3,3,3,0,0), split.tables = 200, split.cells = 35,
justify = c('left', rep('right', 5)), keep.trailing.zeros = TRUE)
pandoc.table(dat.2[, c(1,9:11)],
caption = "Traits coverage in each sites. Percentage of species with species level trait data.",
digits = 1, split.tables = 200, split.cells = 25,
justify = c('left', rep('right', 3)),
keep.trailing.zeros = TRUE)
```
......@@ -70,6 +78,7 @@ source.root("R/analysis/lmer.run.R")
source.root("R/utils/plot.R")
```
# Model results
``` {r ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE}
list.all.results <-
......@@ -85,20 +94,27 @@ mat.param.sd <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
mat.R2 <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.R2c, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species'))
mat.param.mean.sd <- matrix(paste0(round(mat.param, 4),
bold.index <- which(((mat.param - 1.96*mat.param.sd) >0 & mat.param > 0) |
((mat.param + 1.96*mat.param.sd) <0 & mat.param <0),
arr.ind = TRUE)
mat.param.mean.sd <- matrix(paste0(round(mat.param, 3),
' (',
round(mat.param.sd, 4),
round(mat.param.sd, 3),
')'), ncol = 3)
mat.param <- rbind(mat.param.mean.sd,
round(mat.R2, 4))
colnames(mat.param) <- c('Wood.density', 'SLA', 'Max.height')
row.names(mat.param) <- c('$\\gamma$', '$m_1$', '$alpha_0$',
colnames(mat.param) <- c('Wood density', 'SLA', 'Maximum height')
row.names(mat.param) <- c('$\\gamma$', '$m_1$', '$\\alpha_0$',
'$\\alpha_i$', '$\\alpha_r$',
'$\\alpha_s$', '$R^2$*')
```
``` {r Table2_Effectsize, echo = FALSE, results='asis', message=FALSE}
pandoc.table(mat.param, caption = "Standaridized parameters estimates and standard error (in bracket) estimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters")
pandoc.table(mat.param, caption = "Standaridized parameters estimates and standard error (in bracket) estimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters",
digits = 3, justify = c('left', rep('right', 3)),
emphasize.strong.cells = bold.index, split.tables = 200)
```
\* We report the conditional $R^2$ of the models using the methods of Nakagawa, S. & Schielzeth, H. A general and simple method for obtaining R2 from generalized linear mixed-effects models. Methods in Ecology and Evolution 4, 133142 (2013).
......@@ -3,9 +3,9 @@
![Map of the plot locations of all data sets analysed. Large xy plots are represented with a large points (The data set of Panama comprise both a 50ha plot and a network of 1ha plots).](image/worldmapB.png)
![Map of the plot locations of all data sets analysed. LPP plots are represented with a large points and NFI plots with small points (The data set of Panama comprise both a 50ha plot and a network of 1ha plots).](image/worldmapB.png)
\newpage
\newpage
......@@ -13,79 +13,75 @@
# Data description
-------------------------------------------------------------------------------------------------------------
set # of trees # of species # of plots/quadrats % of angiosperm % of evergreen
------------------------ ------------ -------------- --------------------- ----------------- ----------------
Sweden 202469 26 22552 27.0 72.9
-----------------------------------------------------------------------------------------------
set # of trees # of species # of % of angiosperm % of evergreen
plots/quadrats
--------------- ------------ -------------- ---------------- ----------------- ----------------
Sweden 202469 26 22552 0.27 0.729
New Zealand 53775 117 1415 94.0 99.1
New Zealand 53775 117 1415 0.94 0.991
US 1369815 493 59840 63.3 37.2
US 1369815 493 59840 0.633 0.372
Canada 495008 75 14983 34.4 64.9
Canada 495008 75 14983 0.344 0.649
Australia 906 101 63 99.9 92.4
Australia 906 101 63 0.999 0.924
France 184316 127 17611 74.1 28.5
France 184316 127 17611 0.741 0.285
Switzerland 28207 65 2597 36.1 55.5
Switzerland 28207 65 2597 0.361 0.555
Spain 418805 122 36462 34.7 81.6
Spain 418805 122 36462 0.347 0.816
Panama 26994 238 2033 99.8 77.7
Panama 26994 238 2033 0.998 0.777
Paracou 46382 714 2157 100.0 83.5
Paracou 46382 714 2157 1 0.835
Japan 4637 138 318 72.2 70.8
Japan 4637 138 318 0.722 0.708
Taiwan 14701 72 623 92.0 75.3
Taiwan 14701 72 623 0.92 0.753
Puerto Rico 14011 82 399 100.0 99.0
Puerto Rico 14011 82 399 1 0.99
Central African 17602 203 989 0.995 0.725
Republic
-----------------------------------------------------------------------------------------------
Central African Republic 17602 203 989 99.5 72.5
-------------------------------------------------------------------------------------------------------------
Table: Data description, with number of individual tree, species and plot in NFI data and quadrat in LPP data, and percentage of angiosperm and evergreen species.
----------------------------------------------------------
set % cover SLA % cover Wood % cover Max
density height
--------------- ------------- -------------- -------------
Sweden 1 1 0.98
----------------------------------------------------------------------------------
set % cover SLA % cover Wood density % cover Max height
------------------------ ------------- ---------------------- --------------------
Sweden 100 100 98
New Zealand 1 1 1
New Zealand 100 100 100
US 0.91 0.94 1
US 91 94 100
Canada 0.99 0.99 1
Canada 99 99 100
Australia 0 0.99 1
Australia 0 99 100
France 0.99 0.99 1
France 99 99 100
Switzerland 0.97 0.95 1
Switzerland 97 95 100
Spain 0.97 0.99 1
Spain 97 99 100
Panama 0.93 0.93 0.95
Panama 93 93 95
Paracou 0.73 0.73 0.63
Paracou 73 73 63
Japan 1 1 1
Japan 100 100 100