Commit 7ea9e144 authored by kunstler's avatar kunstler
Browse files

include Mark comments and update ref format and author affiliation

parent ce7c70df
......@@ -694,6 +694,19 @@ extract.param <- function(trait, list.res,
return(param.mean)
}
extract.param.sd <- function(trait, list.res,
model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species',
param.vec = c("logD", "Tf","sumBn", "sumTnBn",
"sumTfBn", "sumTnTfBn.abs")){
list.temp <- list.res[[paste("simple_", trait ,
"_", model,
sep = '')]]$lmer.summary
param.mean <- list.temp$fixed.coeff.Std.Error
names(param.mean) <- names(list.temp$fixed.coeff.E)
return(param.mean[param.vec])
}
extract.R2c <- function(trait, list.res,
model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species',
param.vec = c("logD", "Tf","sumBn", "sumTnBn",
......@@ -704,6 +717,15 @@ extract.R2c <- function(trait, list.res,
return(list.temp$R2c)
}
extract.R2m <- function(trait, list.res,
model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species',
param.vec = c("logD", "Tf","sumBn", "sumTnBn",
"sumTfBn", "sumTnTfBn.abs")){
list.temp <- list.res[[paste("simple_", trait ,
"_", model,
sep = '')]]$lmer.summary
return(list.temp$R2m)
}
## get fixed biomes
......
"id","citation"
id,citation
1,"Kooyman, R.M. and Westoby, M. (2009) Costs of height gain in rainforest saplings: main stem scaling, functional traits and strategy variation across 75 species. Annals of Botany 104: 987-993."
2,"Kooyman, R.M., Rossetto, M., Allen, C. and Cornwell, W. (2012) Australian tropical and sub-tropical rainforest: phylogeny, functional biogeography and environmental gradients. Biotropica 44: 668-679."
3,"Condit, R. 1998. Tropical forest census plots. Springer, Berlin, Germany."
4,"Condit, R., Engelbrecht, B.M.J., Pino, D., Perez, R., Turner, B.L., 2013. Species distributions in response to individual soil nutrients and seasonal drought across a community of tropical trees. Proceedings of the National Academy of Sciences 110, 50645068. doi:10.1073/pnas.1218042110"
5,"Yakushima Forest Environment Conservation Center, Ishihara, M.I., Suzuki, S.N., Nakamura, M., Enoki, T., Fujiwara, A., Hiura, T., Homma, K., Hoshino, D., Hoshizaki, K., Ida, H., Ishida, K., Itoh, A., Kaneko, T., Kubota, K., Kuraji, K., Kuramoto, S., Makita, A., Masaki, T., Namikawa, K., Niiyama, K., Noguchi, M., Nomiya, H., Ohkubo, T., Saito, S., Sakai, T., Sakimoto, M., Sakio, H., Shibano, H., Sugita, H., Suzuki, M., Takashima, A., Tanaka, N., Tashiro, N., Tokuchi, N., Yoshida, T., Yoshida, Y., 2011. Forest stand structure, composition, and dynamics in 34 sites over Japan. Ecological Research 26, 10071008. doi:10.1007/s11284-011-0847-y"
6,"Thompson, J., N. Brokaw, J. K. Zimmerman, R. B. Waide, E. M. Everham III, D. J. Lodge, C. M. Taylor, D. Garcıa-Montiel, and M. Fluet. 2002. Land use history, environment, and tree composition in a tropical forest. Ecological Applications 12:13441363."
7,"Ouédraogo, D.-Y., Mortier, F., Gourlet-Fleury, S., Freycon, V., and Picard, N. (2013). Slow-growing species cope best with drought: evidence from long-term measurements in a tropical semi-deciduous moist forest of Central Africa. Journal of Ecology 101, 1459--1470."
8,"Gourlet-Fleury, S., Rossi, V., Rejou-Mechain, M., Freycon, V., Fayolle, A., Saint-André, L., Cornu, G., Gérard, J., Sarrailh, J.-M., Flores, O., et al. (2011). Environmental filtering of dense-wooded species controls above-ground biomass stored in African moist forests. Journal of Ecology 99, 981-990."
9,"Lasky, J.R., Sun, I., Su, S.-H., Chen, Z.-S., and Keitt, T.H. (2013). Trait-mediated effects of environmental filtering on tree community dynamics. Journal of Ecology."
4,"Condit, R., Engelbrecht, B.M.J., Pino, D., Perez, R., Turner, B.L., 2013. Species distributions in response to individual soil nutrients and seasonal drought across a community of tropical trees. Proceedings of the National Academy of Sciences 110, 5064-5068."
5,"Yakushima Forest Environment Conservation Center, Ishihara, M.I., Suzuki, S.N., Nakamura, M., Enoki, T., Fujiwara, A., Hiura, T., Homma, K., Hoshino, D., Hoshizaki, K., Ida, H., Ishida, K., Itoh, A., Kaneko, T., Kubota, K., Kuraji, K., Kuramoto, S., Makita, A., Masaki, T., Namikawa, K., Niiyama, K., Noguchi, M., Nomiya, H., Ohkubo, T., Saito, S., Sakai, T., Sakimoto, M., Sakio, H., Shibano, H., Sugita, H., Suzuki, M., Takashima, A., Tanaka, N., Tashiro, N., Tokuchi, N., Yoshida, T., Yoshida, Y., 2011. Forest stand structure, composition, and dynamics in 34 sites over Japan. Ecological Research 26, 1007-1008. "
6,"Thompson, J., N. Brokaw, J. K. Zimmerman, R. B. Waide, E. M. Everham III, D. J. Lodge, C. M. Taylor, D. GarciaMontiel, and M. Fluet. 2002. Land use history, environment, and tree composition in a tropical forest. Ecological Applications 12:1344-1363."
7,"Ouadraogo, D.-Y., Mortier, F., Gourlet-Fleury, S., Freycon, V., and Picard, N. (2013). Slow-growing species cope best with drought: evidence from long-term measurements in a tropical semi-deciduous moist forest of Central Africa. Journal of Ecology 101, 14591470."
8,"Gourlet-Fleury, S., Rossi, V., Rejou-Mechain, M., Freycon, V., Fayolle, A., Saint-Andre, L., Cornu, G., Gérard, J., Sarrailh, J.-M., Flores, O., et al. (2011). Environmental filtering of dense-wooded species controls above-ground biomass stored in African moist forests. Journal of Ecology 99, 981-990."
9,"Lasky, J.R., Sun, I., Su, S.-H., Chen, Z.-S., and Keitt, T.H. (2013). Trait-mediated effects of environmental filtering on tree community dynamics. Journal of Ecology 101, 722-733."
10,"Herault, B., Bachelot, B., Poorter, L., Rossi, V., Bongers, F., Chave, J., Paine, C.E., Wagner, F., and Baraloto, C. (2011). Functional traits shape ontogenetic growth trajectories of rain forest tree species. Journal of Ecology 99, 1431-1440."
11,"Herault, B., Ouallet, J., Blanc, L., Wagner, F., and Baraloto, C. (2010). Growth responses of neotropical trees to logging gaps. Journal of Applied Ecology 47, 821-831."
12,"IFN. (2011). Les résultats issus des campagnes d'inventaire 2006, 2007, 2008, 2009, 2010 et 2011. Inventaire Forestier National, Nogent-sur-Vernisson, FR."
13,"http://inventaire-forestier.ign.fr/spip/spip.php?rubrique153"
12,"IFN. (2011). Les resultats issus des campagnes d'inventaire 2006, 2007, 2008, 2009, 2010 et 2011. Inventaire Forestier National, Nogent-sur-Vernisson, FR."
13,http://inventaire-forestier.ign.fr/spip/spip.php?rubrique153
14,"Villaescusa, R. & Diaz, R. (1998) Segundo Inventario Forestal Nacional (1986-1996), Ministerio de Medio Ambiente, ICONA, Madrid."
15,"Villanueva, J.A. (2004) Tercer Inventario Forestal Nacional (1997-2007). Comunidad de Madrid. Ministerio de Medio Ambiente, Madrid."
16,"http://www.magrama.gob.es/es/desarrollo-rural/temas/politica-forestal/inventario-cartografia/inventario-forestal-nacional/default.aspx"
17,"http://www.lfi.ch/index-en.php"
18,"Fridman, J., and Stahl, G. (2001). A three-step approach for modelling tree mortality in Swedish forests. Scandinavian Journal of Forest Research 16, 455–466."
19,"http://www.fia.fs.fed.us/tools-data/"
20,"Wiser, S.K., Bellingham, P.J. & Burrows, L.E. (2001) Managing biodiversity information: development of New Zealand’s National Vegetation Survey databank. New Zealand Journal of Ecology, 25, 1–17."
21,"https://nvs.landcareresearch.co.nz/"
16,http://www.magrama.gob.es/es/desarrollo-rural/temas/politica-forestal/inventario-cartografia/inventario-forestal-nacional/default.aspx
17,http://www.lfi.ch/index-en.php
18,"Fridman, J., and Stahl, G. (2001). A three-step approach for modelling tree mortality in Swedish forests. Scandinavian Journal of Forest Research 16, 455-466."
19,http://www.fia.fs.fed.us/tools-data/
20,"Wiser, S.K., Bellingham, P.J. & Burrows, L.E. (2001) Managing biodiversity information: development of New Zealand's National Vegetation Survey databank. New Zealand Journal of Ecology, 25, 1-17."
21,https://nvs.landcareresearch.co.nz/
Data set name,Country,Data type,Plot size,Dbh threshold,Number of plots,Traits,Source trait data,References,Contact of person in charge of data formatting,Comments
NSW,"New South Wales, Australia",LPP,0.075 to 0.36 ha,10 cm,30,"Wood density, Maximum height, and Seed mass",local,"1,2",R. M. Kooyman (robert@ecodingo.com.au),Permanents plots established by the NSW Department of State Forests or by RMK
Panama,Panama,LPP,1 to 50 ha,1 cm,42,"Wood density, SLA, Maximum height, and Seed mass",local,"3,4",R. Condit (conditr@gmail.com),The data used include both the 50 ha lot of BCI and the network of 1 ha plots from Condit et al. (2013). The two first census of BCI plot were excluded.
Japan,Japan,LPP,0.35 to 1.05 ha,2.39 cm,16,"Wood density, SLA, Maximum height, and Seed mass",local,5,M. I. Ishihara & S. N. Suzuki (moni1000f_networkcenter@fsc.hokudai.ac.jp),
Japan,Japan,LPP,0.35 to 1.05 ha,2.39 cm,16,"Wood density, SLA, Maximum height, and Seed mass",local,5,M. I. Ishihara (moni1000f_networkcenter@fsc.hokudai.ac.jp),
Luquillo,Puerto Rico,LPP,16 ha,1 cm,1,"Wood density, SLA, Maximum height, and Seed mass",local,6,J. Zimmerman (esskz@ites.upr.edu),
M'Baiki,Central African Republic,LPP,4 ha,10 cm,10,"Wood density, SLA, and Seed mass",local,"7,8",Ghislain Vieilledent (ghislain.vieilledent@cirad.fr),
Fushan,Taiwan,LPP,25 ha,1 cm,1,"Wood density, SLA, and Seed mass",local,9,I-Fang Sun (ifsun@mail.ndhu.edu.tw),
Paracou,French Guiana,LPP,6.25 ha,10 cm,15,"Wood density, SLA, and Seed mass",local,"10,11",Bruno Herault (bruno.herault@cirad.fr),
France,France,NFI,0.017 to 0.07 ha,7.5 cm,41503,"Wood density, SLA, Maximum height, and Seed mass",TRY,"12,13",Georges Kunstler (georges.kunstler@gmail.com),"The French NFI is based on temporary plot, but 5 years tree radial growth is estimated with short core. All trees with dbh > 7.5 cm, > 22.5 cm and > 37.5 cm were measured within a radius of 6 m, 9 m and 15 m, respectively. Plots are distributed over forest ecosystems on a 1-km 2 cell grid"
M'Baiki,Central African Republic,LPP,4 ha,10 cm,10,"Wood density, SLA, and Seed mass",local,"7,8",G. Vieilledent (ghislain.vieilledent@cirad.fr),
Fushan,Taiwan,LPP,25 ha,1 cm,1,"Wood density, SLA, and Seed mass",local,9,I-F. Sun (ifsun@mail.ndhu.edu.tw),
Paracou,French Guiana,LPP,6.25 ha,10 cm,15,"Wood density, SLA, and Seed mass",local,"10,11",B. Herault (bruno.herault@cirad.fr),
France,France,NFI,0.017 to 0.07 ha,7.5 cm,41503,"Wood density, SLA, Maximum height, and Seed mass",TRY,"12,13",G. Kunstler (georges.kunstler@gmail.com),"The French NFI is based on temporary plot, but 5 years tree radial growth is estimated with short core. All trees with dbh > 7.5 cm, > 22.5 cm and > 37.5 cm were measured within a radius of 6 m, 9 m and 15 m, respectively. Plots are distributed over forest ecosystems on a 1-km 2 cell grid"
Spain,Spain,NFI,0.0078 to 0.19 ha,7.5 cm,49855,"Wood density, SLA, Maximum height, and Seed mass",TRY,"14,15,16",M. Zavala (madezavala@gmail.com),"Each SFI plot included four concentric circular sub-plots of 5, 10, 15 and 25-m radius. In these sub-plots, adult trees were sampled when diameter at breast height (d.b.h.) was 7.5-12.4 cm, 12.5-22.4 cm, 22.5-42.5 cm and >= 42.5 cm, respectively."
Swiss,Switzerland,NFI,0.02 to 0.05 ha,12 cm,2665,"Wood density, SLA, Maximum height, and Seed mass",TRY,17,Niklaus E. Zimmermann (niklaus.zimmermann@wsl.ch),"All trees with dbh > 12 cm and > 36 cm were measured within a radius of 7.98 m and 12.62 m, respectively."
Sweden,Sweden,NFI,0.0019 to 0.0314 ha,5 cm,22904,"Wood density, SLA, Maximum height, and Seed mass",TRY,18,Goran Stahl (Goran.Stahl@slu.se),"All trees with dbh > 10 cm, were measured on circular plots of 10 m radius."
US,USA,NFI,0.0014 to 0.017 ha,2.54 cm,97434,"Wood density, SLA, Maximum height, and Seed mass",TRY,"19,20",Marc Vanderwel (Mark.Vanderwel@uregina.ca ),FIA data are made up of cluster of 4 subplots of size 0.017 ha for tree dbh > 1.72 cm and nested in each subplot sapling plots of 0.0014 ha for trees dbh > 2.54 cm. The data of the four subplot were lumped together.
Canada,Canada,NFI,0.02 to 0.18 ha,2 cm,15019,"Wood density, SLA, Maximum height, and Seed mass",TRY,,John Caspersen (john.caspersen@utoronto.ca),The protocol is variable between Provinces. A large proportion of data is from the Quebec province and the plot are 10 m in radius in this Province.
Swiss,Switzerland,NFI,0.02 to 0.05 ha,12 cm,2665,"Wood density, SLA, Maximum height, and Seed mass",TRY,17,N. E. Zimmermann (niklaus.zimmermann@wsl.ch),"All trees with dbh > 12 cm and > 36 cm were measured within a radius of 7.98 m and 12.62 m, respectively."
Sweden,Sweden,NFI,0.0019 to 0.0314 ha,5 cm,22904,"Wood density, SLA, Maximum height, and Seed mass",TRY,18,G. Stahl (Goran.Stahl@slu.se),"All trees with dbh > 10 cm, were measured on circular plots of 10 m radius."
US,USA,NFI,0.0014 to 0.017 ha,2.54 cm,97434,"Wood density, SLA, Maximum height, and Seed mass",TRY,"19,20",M. Vanderwel (Mark.Vanderwel@uregina.ca ),FIA data are made up of cluster of 4 subplots of size 0.017 ha for tree dbh > 1.72 cm and nested in each subplot sapling plots of 0.0014 ha for trees dbh > 2.54 cm. The data of the four subplot were lumped together.
Canada,Canada,NFI,0.02 to 0.18 ha,2 cm,15019,"Wood density, SLA, Maximum height, and Seed mass",TRY,,J. Caspersen (john.caspersen@utoronto.ca),The protocol is variable between Provinces. A large proportion of data is from the Quebec province and the plot are 10 m in radius in this Province.
NVS,New Zealand,NFI,0.04 ha,3 cm,1415,"Wood density, SLA, Maximum height, and Seed mass",local,"20,21",D. Laughlin (d.laughlin@waikato.ac.nz),Plots are 20 x 20 m.
all: paper.pdf extended_method.pdf extended_data.pdf
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 $@
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 $@
paper.docx: paper.md include.tex refs.bib
pandoc -s -S $< --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
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')"
......@@ -23,6 +23,12 @@ extended_data.md: extended_data.R
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 $@
SupplMat.md: Suppl_Mat.Rmd
Rscript -e "library(knitr); knit('Suppl_Mat.Rmd', output = 'SupplMat.md')"
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 $@
clean:
rm -f *.pdf
rm -f *.html
......
% 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}$).
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:
\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}
\end{equation}
Where:
$B_{tot} = \sum_{c=1}^{C_p} {B_{c}}$,
$B_{t_c} = \sum_{c=1}^{C_p} {t_c \times B_{c}}$,
and $B_{\vert t_c - t_f \vert} = \sum_{c=1}^{C_p} {\vert t_c - t_f \vert \times B_{c}}$.
## Details on sites
```{r kable, echo = FALSE, results="asis"}
library(plyr)
dat <- read.csv('../../data/metadata/sites/sites_description.csv', check.names=FALSE, stringsAsFactors=FALSE)
# reorder so references column is last
i <- match("References", names(dat))
dat <- dat[,c(seq_len(ncol(dat))[-c(i)], i)]
refs <- read.csv('../../data/metadata/sites/references.csv', check.names=FALSE, stringsAsFactors=FALSE)
replace_refs <- function(x){
ids <- as.numeric(unlist(strsplit(x,",")))
if(length(ids>0))
ret <- paste0("\n\t- ", refs$citation[match(ids, refs$id)], collapse="")
else
ret <- ""
}
dat$References <- sapply(dat$References, replace_refs)
paste_name_data <- function(df){
sprintf("## %s\n\n%s\n\n", df[["Data set name"]],
paste0(
llply(names(df)[-c(1)], function(x) sprintf("- %s: %s", x, df[[x]])), collapse="\n")
)
}
writeLines(unlist(dlply(dat, 1, paste_name_data)))
```
# Supplementary discussion
## 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 ne 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).
# References
## # Extend data
## ```{r options-chunk}
## ```{r options-chunk, echo = FALSE, results = 'hide', message=FALSE}
## opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
## ```
......@@ -24,6 +24,35 @@ readRDS.root <- function(filename) {
##+ Load script, echo = FALSE, results = 'hide', message=FALSE
path.root <- git.root()
##+ kable2, echo = FALSE, results="asis", message=FALSE
library(pander)
data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv'))
dat.2 <- data.set[, -(2)]
var.names <- colnames(dat.2)
var.names[2] <- '# of trees'
var.names[3] <- '# of species'
var.names[4] <- '# of plots/quadrats'
var.names[5] <- '% of angiosperm'
var.names[6] <- '% of evergreen'
var.names[7] <- '% cover Leaf N'
var.names[8] <- '% cover Seed mass'
var.names[9] <- '% cover SLA'
var.names[10] <- '% cover Wood density'
var.names[11] <- '% cover Max height'
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 = 2, 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)
##+ Describe data, echo = FALSE, results = 'hide', message=FALSE
source.root("R/analysis/lmer.output-fun.R")
source.root("R/analysis/lmer.run.R")
......@@ -38,16 +67,24 @@ library(pander)
mat.param <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.param, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species'))
mat.param.sd <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.param.sd, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species'))
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 <- rbind(mat.param, mat.R2)
mat.param.mean.sd <- matrix(paste0(round(mat.param, 4),
' (',
round(mat.param.sd, 4),
')'), 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('Size', 'Direct trait effect', 'Competition trait indep',
'Competitive impact', 'Competitive response',
'Trait similarity', 'R2c')
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 presented in Fig 2. and R2 of models")
pandoc.table(mat.param, caption = "Standaridized parameters estimates and standard error (in bracket) presentedestimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters")
## 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).
## \* 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).
# Extend data
```{r options-chunk}
```{r options-chunk, echo = FALSE, results = 'hide', message=FALSE}
opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
```
......@@ -26,6 +26,36 @@ readRDS.root <- function(filename) {
path.root <- git.root()
```
``` {r kable2, echo = FALSE, results="asis", message=FALSE}
library(pander)
data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv'))
dat.2 <- data.set[, -(2)]
var.names <- colnames(dat.2)
var.names[2] <- '# of trees'
var.names[3] <- '# of species'
var.names[4] <- '# of plots/quadrats'
var.names[5] <- '% of angiosperm'
var.names[6] <- '% of evergreen'
var.names[7] <- '% cover Leaf N'
var.names[8] <- '% cover Seed mass'
var.names[9] <- '% cover SLA'
var.names[10] <- '% cover Wood density'
var.names[11] <- '% cover Max height'
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 = 2, 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)
```
``` {r Describe data, echo = FALSE, results = 'hide', message=FALSE}
source.root("R/analysis/lmer.output-fun.R")
source.root("R/analysis/lmer.run.R")
......@@ -41,18 +71,26 @@ library(pander)
mat.param <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.param, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species'))
mat.param.sd <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.param.sd, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species'))
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 <- rbind(mat.param, mat.R2)
mat.param.mean.sd <- matrix(paste0(round(mat.param, 4),
' (',
round(mat.param.sd, 4),
')'), 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('Size', 'Direct trait effect', 'Competition trait indep',
'Competitive impact', 'Competitive response',
'Trait similarity', 'R2c')
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 presented in Fig 2. and R2 of models")
pandoc.table(mat.param, caption = "Standaridized parameters estimates and standard error (in bracket) presentedestimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters")
```
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).
\* 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).
# Extend data
```r
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)
......@@ -19,26 +16,103 @@ opts_chunk$set(dev= c('pdf','svg'), fig.width= 10, fig.height = 5)
----------------------------------------------------------------------------------------
set # of trees # of species # of % of angiosperm % of evergreen
plots/quadrats
-------- ------------ -------------- ---------------- ----------------- ----------------
Sweden 2e+05 26 22552 0.27 0.73
NVS 53775 117 1415 0.94 0.99
-----------------------------------------------------------------
&nbsp; Wood.density SLA Max.height
----------------------------- -------------- ------- ------------
**Size** 0.4262 0.4088 0.4224
US 1370497 492 59840 0.63 0.37
**Direct trait effect** -0.1255 0.1081 0.05803
Canada 5e+05 75 14983 0.34 0.65
**Competition trait indep** -0.3231 -0.2461 -0.3358
NSW 906 101 63 1 0.92
**Competitive impact** -0.02219 0.08218 -0.02344
France 184316 127 17611 0.74 0.28
**Competitive response** 0.0582 0.01802 -0.08021
Swiss 28260 59 2597 0.36 0.55
**Trait similarity** 0.04117 0.05546 0.06229
Spain 418805 122 36462 0.35 0.82
**R2c** 0.7072 0.7514 0.7156
-----------------------------------------------------------------
BCI 27081 237 2033 1 0.78
Table: Standaridized parameters estimates presented in Fig 2. and R2 of models
Paracou 46367 715 2157 1 0.83
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).
Japan 4663 136 318 0.73 0.7
Fushan 14701 72 623 0.92 0.75
Luquillo 14011 82 399 1 0.99
Mbaiki 17575 204 989 0.99 0.73
----------------------------------------------------------------------------------------
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
NVS 1 1 1
US 0.91 0.94 1
Canada 0.99 0.99 1
NSW 0 0.99 1
France 0.99 0.99 1
Swiss 0.97 0.95 1
Spain 0.97 0.99 1
BCI 0.93 0.93 0.95
Paracou 0.73 0.74 0.64
Japan 1 1 1
Fushan 1 0.99 0.96
Luquillo 0.99 0.99 0.99
Mbaiki 0.4 0.47 0
---------------------------------------------------
Table: Traits coverage in each sites. Percentage of species with species level trait data.
------------------------------------------------------------------
&nbsp; Wood.density SLA Max.height
---------------- ---------------- --------------- ----------------
**$\gamma$** 0.4262 (0.0135) 0.4088 (0.014) 0.4224 (0.0131)
**$m_1$** -0.1255 (0.0416) 0.1081 (0.0485) 0.058 (0.0434)
**$alpha_0$** -0.3231 (0.056) -0.2461 (0.077) -0.3358 (0.0683)
**$\alpha_i$** -0.0222 (0.0168) 0.0822 (0.0273) -0.0234 (0.0265)
**$\alpha_r$** 0.0582 (0.0215) 0.018 (0.0391) -0.0802 (0.0366)
**$\alpha_s$** 0.0412 (0.0156) 0.0555 (0.0293) 0.0623 (0.0164)
**$R^2$*** 0.7072 0.7514 0.7156
------------------------------------------------------------------
Table: Standaridized parameters estimates and standard error (in bracket) presentedestimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters
\* 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).
......@@ -32,7 +32,7 @@ To include the effect of a focal trees' traits, $t_f$, on its growth, we let:
Here $m_0$ is the average maximum growth, $m_1$ gives the effect of the focal trees trait, and $\epsilon_{G_{\textrm{max}}, f}$, $\epsilon_{G_{\textrm{max}}, p}$, $\epsilon_{G_{\textrm{max}}, s}$ are normally distributed random effect for species $f$, plot or quadrat $p$ (see below), and data set $s$.
To include traits effects on competition presented in Fig. 1, competitive interactions were modelled using an equation of the form [^GK1]:
To include traits effects on competition presented in Fig. 1, competitive interactions were modelled using an equation of the form (for fitting the model this equation was simplified as community weighted mean of the different trait dimension, see Supplementary methods for more details) :
\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}
......@@ -43,8 +43,6 @@ where:
- $\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}$).
[^GK1]: With basal area of species $c$ this equation can be simplified as a function of total basal area, the weighted mean of the traits of the competitors and the weighted mean of the traits similarity.
Eqs. \ref{logG1}-\ref{alpha} were then fitted to empirical estimates of growth, given by
\begin{equation} \label{logGobs} G_{i,f,p,s} = 0.25 \pi \left(D_{i,f,p,s,t+1}^2 - D_{i,f,p,s,t}^2\right).
\end{equation}
......@@ -62,7 +60,7 @@ Our main objective was collate data sets spanning the dominant forest biomes of
the world. Datasets were included if they (i) allowed both growth rate of individual trees and the local abundance of competitors to be estimated, and (ii) had good (>50%) coverage for at least one
of the traits of interest (SLA, wood density, and maximum height).
The datasets collated fell into two broad categories: (1) national forest inventories (NFI), in which trees above a given diameter are sampled in a network of small plots (often on a regular grid) covering the country; (2) large permanent plots (LPP) ranging in size from 0.5-50ha, in which the x-y coordinates of all trees above a given diameter were recorded. These LPP were mostly located in tropical regions. The minimum diameter of recorded trees varied among sites from 1-12cm. To allow comparison between data sets, we restricted our analysis to trees greater than 10cm. Moreover, we excluded from the analysis any plots with harvesting during the growth measurement period, that was identified as a plantation, or overlapping a forest edge. Finally, we selected only two consecutive census for each tree to avoid to have to account for repeated measurements, as only less than a third of teh data had repeated measurements. See the section *Details on sites* and Table M1 for more details on the individual datasets.
The datasets collated fell into two broad categories: (1) national forest inventories (NFI), in which trees above a given diameter are sampled in a network of small plots (often on a regular grid) covering the country; (2) large permanent plots (LPP) ranging in size from 0.5-50ha, in which the x-y coordinates of all trees above a given diameter were recorded. These LPP were mostly located in tropical regions. The minimum diameter of recorded trees varied among sites from 1-12cm. To allow comparison between data sets, we restricted our analysis to trees greater than 10cm. Moreover, we excluded from the analysis any plots with harvesting during the growth measurement period, that was identified as a plantation, or overlapping a forest edge. Finally, we selected only two consecutive census for each tree to avoid to have to account for repeated measurements, as only less than a third of teh data had repeated measurements. See the Supplementary methods and Extended data Table 1 for more details on the individual datasets.
Basal area growth was estimated from diameter measurements recorded across successive time points. For the French NFI, these data were obtained from short tree cores. For all other datasest, diameter at breast height ($D$) of each individual was recorded at multiple censuses. We excluded trees with extreme positive or negative diameter growth rates, following criteria developed at the BCI site [@condit_mortality_1993] and implemented in the R package [CTFS R](http://ctfs.arnarb.harvard.edu/Public/CTFSRPackage/).
......@@ -75,69 +73,11 @@ We extracted mean annual temperature (MAT) and mean annual sum of precipitation
## Traits
Data on species functional traits was extracted from existing sources. We focused on wood density, species specific leaf area (SLA) and maximum height, because these traits have previously been related to competitive interactions and are available for large numbers of species [@wright_functional_2010; @uriarte_trait_2010; @ruger_functional_2012; @kunstler_competitive_2012; @lasky_trait-mediated_2014] (see Table M2 for traits coverage). Where available we used data collected locally; otherwise we sourced data from the [TRY](http://www.try-db.org/) trait data base [@kattge_try_2011]. Local data were available for most tropical sites and species (see Table M1). Several of the NFI datasets also provided height measurements, from which we computed a species' maximum height as the 99% quantile of observed values (France, US, Spain, Switzerland; for Sweden we used the estimate from the French data and for Canada we used the estimate from the US data). Otherwise, we extracted measurement from the TRY database.
Data on species functional traits was extracted from existing sources. We focused on wood density, species specific leaf area (SLA) and maximum height, because these traits have previously been related to competitive interactions and are available for large numbers of species [@wright_functional_2010; @uriarte_trait_2010; @ruger_functional_2012; @kunstler_competitive_2012; @lasky_trait-mediated_2014] (see Extended data Table 2 for traits coverage). Where available we used data collected locally; otherwise we sourced data from the [TRY](http://www.try-db.org/) trait data base [@kattge_try_2011]. Local data were available for most tropical sites and species (see Table M1). Several of the NFI datasets also provided height measurements, from which we computed a species' maximum height as the 99% quantile of observed values (France, US, Spain, Switzerland; for Sweden we used the estimate from the French data and for Canada we used the estimate from the US data). Otherwise, we extracted measurement from the TRY database.
For each focal tree, our approach requires us to also account for the traits of all competitors present in the neighbourhood. Most of our plots had good coverage of competitors, but inevitably there were some trees were trait data were lacking. In these cases we estimated trait data as follows. if possible, we used the genus mean, and if no genus data was available, we used the mean of the species present in the country. However, we restricted our analysis to plots were the percentage of basal area of trees with (i) no species level trait data was less than 10%, and (ii) no genus level data was less than 5%.
# Details on sites
```{r kable, echo = FALSE, results="asis"}
library(plyr)
dat <- read.csv('../../data/metadata/sites/sites_description.csv', check.names=FALSE, stringsAsFactors=FALSE)
# reorder so references column is last
i <- match("References", names(dat))
dat <- dat[,c(seq_len(ncol(dat))[-c(i)], i)]
refs <- read.csv('../../data/metadata/sites/references.csv', check.names=FALSE, stringsAsFactors=FALSE)
replace_refs <- function(x){
ids <- as.numeric(unlist(strsplit(x,",")))
if(length(ids>0))
ret <- paste0("\n\t- ", refs$citation[match(ids, refs$id)], collapse="")
else
ret <- ""
}
dat$References <- sapply(dat$References, replace_refs)
paste_name_data <- function(df){
sprintf("## %s\n\n%s\n\n", df[["Data set name"]],
paste0(
llply(names(df)[-c(1)], function(x) sprintf("- %s: %s", x, df[[x]])), collapse="\n")
)
}
writeLines(unlist(dlply(dat, 1, paste_name_data)))
```
\newpage
```{r kable2, echo = FALSE, results="asis"}
library(pander)
data.set <-read.csv(file.path('../../output', 'data.set.csv'))
dat.2 <- data.set[, -(2)]
var.names <- colnames(dat.2)
var.names[2] <- '# of trees'
var.names[3] <- '# of species'
var.names[4] <- '# of plots/quadrats'
var.names[5] <- '% of angiosperm'
var.names[6] <- '% of evergreen'
var.names[7] <- '% cover Leaf N'
var.names[8] <- '% cover Seed mass'
var.names[9] <- '% cover SLA'
var.names[10] <- '% cover Wood density'
var.names[11] <- '% cover Max height'
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 = "Table M1. Data description",
digits = 2, split.tables = 200, split.cells = 15)
pandoc.table(dat.2[, c(1,9:11)], caption = "Table M2. Traits coverage",
digits = 2, split.tables = 200, split.cells = 15)
```
# References
This diff is collapsed.
......@@ -143,7 +143,27 @@ $endfor$
$if(title)$
\title{$title$}
$endif$
\author{$for(author)$$author$$sep$ \and $endfor$}
%% FROM https://github.com/humburg/reproducible-reports/blob/master/include/report.latex
$if(author)$
\usepackage{authblk}
$if(address)$
$for(author)$
\author[$for(author.affiliation)$$author.affiliation$$sep$, $endfor$]{$author.name$}
$endfor$
$for(address)$
\affil[$address.code$]{$address.address$}
$endfor$
$else$
$for(author)$
$if(author.name)$
\author{$author.name$}
$else$
\author{$author$}
$endif$
$endfor$
$endif$