Commit 68e16c81 authored by Kunstler Georges's avatar Kunstler Georges
Browse files

rerun with koppen all and progress on figures

No related merge requests found
Showing with 849 additions and 188 deletions
+849 -188
......@@ -247,7 +247,6 @@ seq.BATOT <- seq(from = 0,
return(list(trait.quant, seq.BATOT))
}
#TODO UPDATE TO WORK WITH INTRA
fun.generate.pred.param.dat <- function(list.sd, Tf.low, Tf.high, seq.sumBn,
N.pred = 100, MAT.MAP.TF = FALSE,
intra.TF = FALSE){
......@@ -511,7 +510,7 @@ easyPredCI <- function(list.res, newdata, alpha=0.05) {
## BOLKER FUNCTION FROM RPUB
easyPredCI.param <- function(list.res, type, newdata, alpha=0.05,alpha_0 = 'sumBn') {
if (! type %in% c('maxG', 'alphar', 'alphae', 'alphal'))
if (! type %in% c('maxG', 'alphar', 'alphae', 'alphal', 'alpha0'))
stop ('error in type')
beta <- list.res$lmer.summary$fixed.coeff.E
V <- list.res$vcov
......@@ -523,7 +522,8 @@ easyPredCI.param <- function(list.res, type, newdata, alpha=0.05,alpha_0 = 'sumB
maxG = c("(Intercept)", "Tf" ),
alphar = c(alpha_0, "sumTfBn"),
alphae = c(alpha_0, "sumTnBn"),
alphal = c(alpha_0, "sumTnTfBn.abs"))
alphal = c(alpha_0, "sumTnTfBn.abs"),
alpha0 = alpha_0)
X[, !colnames(X) %in% sel.keep] <- 0
pred <- X %*% beta
pred.se <- sqrt(diag(X %*% V %*% t(X))) ## std errors of predictions
......@@ -539,6 +539,11 @@ easyPredCI.param <- function(list.res, type, newdata, alpha=0.05,alpha_0 = 'sumB
inter <- beta['(Intercept)']
meanX <- X[1, '(Intercept)']
}
if (type == 'alpha0'){
inter <- 0
meanX <- 0
}
cbind(newdata,
pred = pred - inter*meanX,
lwr = pred-crit*pred.se - inter*meanX,
......@@ -632,7 +637,41 @@ 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))
if(!intra.TF){
pred.res.a0 <- easyPredCI.param(list.res, type = 'alpha0', new.data, alpha, alpha_0)
pred.res.a0$Tf <- seq(from = list.var[[1]][['ql.o']],
to = list.var[[1]][['qh.o']],
length.out = 100)
pred.res.a0$param.type <- 'alpha0'
pred.res.a0$pred <- -pred.res.a0$pred
pred.res.a0$lwr <- -pred.res.a0$lwr
pred.res.a0$upr <- -pred.res.a0$upr
return(rbind(pred.res.max, pred.res.ar, pred.res.ae, pred.res.al, pred.res.a0))
}
#TODO
if(intra.TF){
pred.res.a0.intra <- easyPredCI.param(list.res, type = 'alpha0', new.data, alpha, alpha_0 = 'sumBn.intra')
pred.res.a0.intra$Tf <- seq(from = list.var[[1]][['ql.o']],
to = list.var[[1]][['qh.o']],
length.out = 100)
pred.res.a0.intra$param.type <- 'alpha0.intra'
pred.res.a0.intra$pred <- -pred.res.a0.intra$pred
pred.res.a0.intra$lwr <- -pred.res.a0.intra$lwr
pred.res.a0.intra$upr <- -pred.res.a0.intra$upr
#
pred.res.a0.inter <- easyPredCI.param(list.res, type = 'alpha0', new.data, alpha, alpha_0 = 'sumBn.inter')
pred.res.a0.inter$Tf <- seq(from = list.var[[1]][['ql.o']],
to = list.var[[1]][['qh.o']],
length.out = 100)
pred.res.a0.inter$param.type <- 'alpha0.inter'
pred.res.a0.inter$pred <- -pred.res.a0.inter$pred
pred.res.a0.inter$lwr <- -pred.res.a0.inter$lwr
pred.res.a0.inter$upr <- -pred.res.a0.inter$upr
return(rbind(pred.res.max, pred.res.ar, pred.res.ae, pred.res.al, pred.res.a0.intra, pred.res.a0.inter))
}
}
......@@ -807,7 +846,7 @@ return(dat.res)
fun.pred.BA.l.and.h.all.traits.3params <- function(traits, model, dir.root,
list.res, N.pred = 100,
data.type, MAT.MAP.TF = FALSE,
alpha_0){
intra.TF = FALSE){
list.df <- vector('list')
for (i in traits){
list.temp <- list.res[[paste(data.type, "_", i ,
......@@ -1408,6 +1447,44 @@ rm(out)
gc()
}
fun.mai.plot.param <- function(t, p, first.p = 'alpha0', last.p = 'maxG'){
if(t == 'Wood density'){
if(p == first.p){
mai.v <- c(0.1, big.m,small.m,0.1)
}else{
if(p == last.p){
mai.v <- c(big.m, big.m,0.1,0.1)
}else{
mai.v <- c(0.1, big.m,0.1,0.1)
}
}
}
if(t == 'Specific leaf area'){
if(p == first.p){
mai.v <- c(0.1, small.m,small.m,0.1)
}else{
if(p == last.p){
mai.v <- c(big.m, small.m,0.1,0.1)
}else{
mai.v <- c(0.1, small.m,0.1,0.1)
}
}
}
if(t == 'Maximum height'){
if(p == first.p){
mai.v <- c(0.1, small.m,small.m,small.m)
}else{
if(p == last.p){
mai.v <- c(big.m, small.m,0.1,small.m)
}else{
mai.v <- c(0.1, small.m,0.1,small.m)
}
}
}
return(mai.v)
}
## param plot
......@@ -1420,83 +1497,78 @@ fun.plot.all.param <- function(list.res,
small.m = 0.2,
col.vec = fun.col.param(),
MAT.MAP.TF = FALSE,
alpha_0 = 'sumBn'
intra.TF = FASLE
){
# predict data
data.param <- fun.pred.BA.l.and.h.all.traits.3params(
traits = c('Wood.density', 'SLA', 'Max.height'),
model = model,
dir.root = dir.root,
list.res = list.res,
data.type = data.type,
MAT.MAP.TF = MAT.MAP.TF,
alpha_0 = alpha_0)
intra.TF = intra.TF)
require(dplyr)
# Layout
m <- matrix(c(1:12), 4, 3)
m <- matrix(c(1:12), 5, 3)
wid <- c(big.m+0.1, small.m+0.1 , 2*small.m+0.1) +
rep((6-big.m-3*small.m-0.3)/3, each= 3)
hei <- c(small.m+0.1, 0.2, 0.2 , big.m) +
rep((10-big.m-small.m- 0.5)/4, each= 4)
hei <- c(small.m+0.1, 0.2, 0.2 , 0.2, big.m) +
rep((10-big.m-small.m- 0.5)/5, each= 5)
layout(m, heights=hei, widths= wid )
traits <- c('Wood.density', 'SLA', 'Max.height')
traits.exp <- c(expression(paste('Wood density (mg m', m^-3, ')')),
expression(paste('Specific leaf area (m', m^2, ' m', g^-1, ')')),
expression(paste('Maximum height (m)')))
names(traits.exp) <- traits
expr.p.vec <- c(expression(paste('Similarity ', alpha[l] %*% abs(t[f] - t[c]))),
if(!intra.TF){
expr.p.vec <- c(expression(paste0('Trait indep ',alpha[0])),
expression(paste('Similarity ', alpha[l] %*% abs(t[f] - t[c]))),
expression(paste('Competitive effect ', alpha[e] %*% t[c])),
expression(paste('Tolerance of competition ', alpha[t] %*% t[f])),
expression(paste('Maximum growth ', m[1] %*% t[f])))
names(expr.p.vec) <- c('alphal', 'alphae', 'alphar', 'maxG')
names(expr.p.vec) <- c('alpha0', 'alphal', 'alphae', 'alphar', 'maxG')
names.param <- c("Tf","sumTnBn",
"sumTfBn", "sumTnTfBn.abs")
names(names.param) <- c('maxG', 'alphae', 'alphar', 'alphal')
for (t in c('Wood density', 'Specific leaf area', 'Maximum height')){
for (p in c('alphal', 'alphae', 'alphar', 'maxG')){
df.t <- data.param[data.param$traits == t, ]
if(t == 'Wood density'){
if(p == 'alphal'){
par(mai=c(0.1, big.m,small.m,0.1))
}else{
if(p == 'maxG'){
par(mai=c(big.m, big.m,0.1,0.1))
}else{
par(mai=c(0.1, big.m,0.1,0.1))
}
}
"sumTfBn", "sumTnTfBn.abs", "sumBn")
names(names.param) <- c('maxG', 'alphae', 'alphar', 'alphal', 'alpha0')
first.p <- 'alpha0'
}
if(t == 'Specific leaf area'){
if(p == 'alphal'){
par(mai=c(0.1, small.m,small.m,0.1))
}else{
if(p == 'maxG'){
par(mai=c(big.m, small.m,0.1,0.1))
}else{
par(mai=c(0.1, small.m,0.1,0.1))
}
}
if(intra.TF){
expr.p.vec <- c(expression(paste0('inter ', alpha[,'0 intra/inter',])),
expression(paste0('inter ', alpha[,'0 intra/inter',])),
expression(paste('Similarity ', alpha[l] %*% abs(t[f] - t[c]))),
expression(paste('Competitive effect ', alpha[e] %*% t[c])),
expression(paste('Tolerance of competition ', alpha[t] %*% t[f])),
expression(paste('Maximum growth ', m[1] %*% t[f])))
names(expr.p.vec) <- c('alpha0.intra', 'alpha0.inter', 'alphal', 'alphae', 'alphar', 'maxG')
names.param <- c("Tf","sumTnBn",
"sumTfBn", "sumTnTfBn.abs", "sumBn.inter", "sumBn.intra")
names(names.param) <- c('maxG', 'alphae', 'alphar', 'alphal', 'alpha0.inter', 'alpha0.intra')
first.p <- 'alpha0.intra'
}
if(t == 'Maximum height'){
if(p == 'alphal'){
par(mai=c(0.1, small.m,small.m,small.m))
}else{
if(p == 'maxG'){
par(mai=c(big.m, small.m,0.1,small.m))
}else{
par(mai=c(0.1, small.m,0.1,small.m))
}
}
}
for (t in c('Wood density', 'Specific leaf area', 'Maximum height')){
for (p in names(expr.p.vec)){
df.t <- data.param[data.param$traits == t, ]
par(mai = fun.mai.plot.param(t, p, first.p = first.p, last.p = 'maxG'))
if(t == 'Wood density'){
if(p == 'maxG'){
fun.plot.param.tf(df = df.t,
param.sel = p,
xlab = expression(paste('Wood density (mg m', m^-3, ')')),
xlab = traits.exp[t],
col.param = col.vec[names.param[p]],
expr.param = expr.p.vec[p], cex.lab = 1.1, cex.axis =0.85, cex = 1)
}else{
if(p == 'alpha0.inter'){
fun.plot.param.tf(df = df.t,
param.sel = p,
xaxt= 'n',xlab = NA,
col.param = col.vec[names.param[p]],
expr.param = NA, cex.lab = 1.1, cex.axis =0.85, cex = 1, add = TRUE, add.ylab.TF = FALSE)
}else{
fun.plot.param.tf(df = df.t,
param.sel = p,
......@@ -1504,42 +1576,35 @@ if(p == 'maxG'){
col.param = col.vec[names.param[p]],
expr.param = expr.p.vec[p], cex.lab = 1.1, cex.axis =0.85, cex = 1)
}
}
}
}
if(t == 'Specific leaf area'){
if(p == 'maxG'){
if(t %in% c('Specific leaf area', 'Maximum height')){
if(p == 'maxG'){
fun.plot.param.tf(df = df.t,
param.sel = p,
xlab = expression(paste('Specific leaf area (m', m^2, ' m', g^-1, ')')),
xlab = traits.exp[t],
col.param = col.vec[names.param[p]],
expr.param = expr.p.vec[p], add.ylab.TF = FALSE, cex.lab = 1.1, cex.axis =0.85, cex = 1)
}else{
if(p == 'alpha0.inter'){
fun.plot.param.tf(df = df.t,
param.sel = p,
xaxt= 'n',xlab = NA,
col.param = col.vec[names.param[p]],
expr.param = expr.p.vec[p], add.ylab.TF = FALSE, cex.lab = 1.1, cex.axis =0.85, cex = 1)
}
}
if(t == 'Maximum height'){
if(p == 'maxG'){
fun.plot.param.tf(df = df.t,
param.sel = p,
xlab = expression(paste('Maximum height (m)')),
col.param = col.vec[names.param[p]],
expr.param = expr.p.vec[p], add.ylab.TF = FALSE, cex.lab = 1.1, cex.axis =0.85, cex = 1)
expr.param = expr.p.vec[p], add.ylab.TF = FALSE, cex.lab = 1.1, cex.axis =0.85,
cex = 1, add =TRUE)
}else{
fun.plot.param.tf(df = df.t,
param.sel = p,
xlab = NA,
xaxt= 'n',
xaxt= 'n',xlab = NA,
col.param = col.vec[names.param[p]],
expr.param = expr.p.vec[p], add.ylab.TF = FALSE, cex.lab = 1.1, cex.axis =0.85, cex = 1)
}
}
}
}
}
}
}
}
......@@ -1587,7 +1652,8 @@ fun.plot.wd.sl.param <- function(list.res,
data.type = 'simple',
big.m = 1.0,
small.m = 0.42,
MAT.MAP.TF = FALSE
MAT.MAP.TF = FALSE,
intra.TF = FALSE
){
......@@ -1598,7 +1664,8 @@ fun.plot.wd.sl.param <- function(list.res,
dir.root = dir.root,
list.res = list.res,
data.type = data.type,
MAT.MAP.TF = MAT.MAP.TF)
MAT.MAP.TF = MAT.MAP.TF,
intra.TF = intra.TF)
require(dplyr)
# Layout
m <- matrix(c(1:4), 2, 2)
......
Data set name,Country,Data type,Plot size,Diameter at breast height threshold,Number of plots,Traits,Source trait data,Evidences of disturbances and succession dynamics,References,Contact of person in charge of data formatting,Comments Panama,Panama,LPP,1 to 50 ha,1 cm,42,"Wood density, SLA, and Maximum height",local,"""Gap disturbances are common in the large 50ha BCI plot [see @Young-1991; @Hubbell-1999; @Lobo-2014]. Hubbell et al.[@Hubbell-1999] estimated that less than 30% of the plot experienced no disturbance over a 13-year period.""","3,4,25","Plot data: R. Condit (conditr@gmail.com), Traits data: J. Wright (wrightj@si.edu)",The data used include both the 50 ha plot 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, and Maximum height",local,"""The network of plot comprise 50% of old growth forest, 17% of old secondary forest and 33% of young secondary forest.""",5,"Plot data: M. I. Ishihara (moni1000f_networkcenter@fsc.hokudai.ac.jp), Traits data: Y Onoda (yusuke.onoda@gmail.com)", Luquillo,Puerto Rico,LPP,16 ha,1 cm,1,"Wood density, SLA, and Maximum height",local,"""The plot has been struck by hurricanes in 1989 and in 1998[@Uriarte-2009]. In addition, two-third of the plot is a secondary forest on land previously used for agriculture and logging[@Uriarte-2009].""","6, 23","Plot data: J. Thompson (jiom@ceh.ac.uk) and J. Zimmerman (esskz@ites.upr.edu), Traits data: N. Swenson (swensonn@msu.edu )", M'Baiki,Central African Republic,LPP,4 ha,10 cm,10,Wood density and SLA,local,"""The plot network was established with three levels of harvesting and one control [@Ouedraogo-2013].""","7,8",G. Vieilledent (ghislain.vieilledent@cirad.fr), Fushan,Taiwan,LPP,25 ha,1 cm,1,Wood density and SLA,local,"""Fushan experienced several Typhoon disturbances in 1994 with tree fall events, the main effect was trees defoliation[@Lin-2011].""",9,I-F. Sun (ifsun@mail.ndhu.edu.tw), Paracou,French Guiana,LPP,6.25 ha,10 cm,15,Wood density and SLA,local,"""The plot network was established with three levels of harvesting and one control (Herault et al. 2010).""","10,11,24","Plot data: B. Herault (bruno.herault@cirad.fr), Traits data: C. Baraloto (Chris.Baraloto@ecofog.gf)", France,France,NFI,0.017 to 0.07 ha,7.5 cm,41503,"Wood density, SLA, and Maximum height",TRY,"""French forests monitored by the French National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below).""","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, and Maximum height",TRY,"""Spanish forests monitored by the Spanish National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. No data are available on the age structure of the plots.""","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, and Maximum height",TRY,"""Swiss forests monitored by the Swiss National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below).""","17,26",M. Hanewinkel & 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, and Maximum height",TRY,"""Swedish forests monitored by the Swedish National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below).""",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, and Maximum height",TRY,"""US forests monitored by the FIA experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Pan et al.[@Pan-2011] shows that young forests represents a significant percentage of the forested area (see age distribution below).""",19,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, and Maximum height",TRY,"""Canadian forests monitored by the regional forest monitoring programs experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Pan et al.[@Pan-2011] shows that young forests represents a significant percentage of the forested area (see age distribution below).""",,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. NZ,New Zealand,NFI,0.04 ha,3 cm,1415,"Wood density, SLA, and Maximum height",local,"""New Zealand forests are experiencing disturbance by earthquake, landslide, storm and volcanic eruptions. According to Holdaway et al.[@Holdaway-2014] having been disturbed during their measurement interval.""","20,21",D. Laughlin (d.laughlin@waikato.ac.nz),Plots are 20 x 20 m. NSW,Australia,NFI,0.075 to 0.36 ha,10 cm,30,"Wood density, and Maximum height",local,The plot network was initially established in the 60s with different level of selection harvesting[@Kariuki-2006].,"1,2",R. M. Kooyman (robert@ecodingo.com.au),Permanents plots established by the NSW Department of State Forests or by RMK
\ No newline at end of file
Data set name,Country,Data type,Plot size,Diameter at breast height threshold,Number of plots,Traits,Source trait data,Evidences of disturbances and succession dynamics,References,Contact of person in charge of data formatting,Comments
Panama,Panama,LPP,1 to 50 ha,1 cm,42,"Wood density, SLA, and Maximum height",local,"""Gap disturbances are common in the large 50ha BCI plot [see @Young-1991; @Hubbell-1999; @Lobo-2014]. Hubbell et al.[@Hubbell-1999] estimated that less than 30% of the plot experienced no disturbance over a 13-year period.""","3,4,25","Plot data: R. Condit (conditr@gmail.com), Traits data: J. Wright (wrightj@si.edu)",The data used include both the 50 ha plot 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, and Maximum height",local,"""The network of plot comprise 50% of old growth forest, 17% of old secondary forest and 33% of young secondary forest.""",5,"Plot data: M. I. Ishihara (moni1000f_networkcenter@fsc.hokudai.ac.jp), Traits data: Y Onoda (yusuke.onoda@gmail.com)",
Luquillo,Puerto Rico,LPP,16 ha,1 cm,1,"Wood density, SLA, and Maximum height",local,"""The plot has been struck by hurricanes in 1989 and in 1998[@Uriarte-2009]. In addition, two-third of the plot is a secondary forest on land previously used for agriculture and logging[@Uriarte-2009].""","6, 23","Plot data: J. Thompson (jiom@ceh.ac.uk) and J. Zimmerman (esskz@ites.upr.edu), Traits data: N. Swenson (swensonn@msu.edu )",
M'Baiki,Central African Republic,LPP,4 ha,10 cm,10,Wood density and SLA,local,"""The plot network was established with three levels of harvesting and unharvested control [@Gourlet-Fleury-2013].""","7,8",G. Vieilledent (ghislain.vieilledent@cirad.fr),
Fushan,Taiwan,LPP,25 ha,1 cm,1,Wood density and SLA,local,"""Fushan experienced several Typhoon disturbances in 1994 with tree fall events, the main effect was trees defoliation[@Lin-2011].""",9,I-F. Sun (ifsun@mail.ndhu.edu.tw),
Paracou,French Guiana,LPP,6.25 ha,10 cm,15,Wood density and SLA,local,"""The plot network was established with three levels of harvesting and unharvested control (Herault et al. 2010).""","10,11,24","Plot data: B. Herault (bruno.herault@cirad.fr), Traits data: C. Baraloto (Chris.Baraloto@ecofog.gf)",
France,France,NFI,0.017 to 0.07 ha,7.5 cm,41503,"Wood density, SLA, and Maximum height",TRY,"""French forests monitored by the French National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below).""","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, and Maximum height",TRY,"""Spanish forests monitored by the Spanish National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. No data are available on the age structure of the plots.""","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, and Maximum height",TRY,"""Swiss forests monitored by the Swiss National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below).""","17,26",M. Hanewinkel & 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, and Maximum height",TRY,"""Swedish forests monitored by the Swedish National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below).""",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, and Maximum height",TRY,"""US forests monitored by the FIA experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Pan et al.[@Pan-2011] shows that young forests represents a significant percentage of the forested area (see age distribution below).""",19,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, and Maximum height",TRY,"""Canadian forests monitored by the regional forest monitoring programs experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Pan et al.[@Pan-2011] shows that young forests represents a significant percentage of the forested area (see age distribution below).""",,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.
NZ,New Zealand,NFI,0.04 ha,3 cm,1415,"Wood density, SLA, and Maximum height",local,"""New Zealand forests are experiencing disturbance by earthquake, landslide, storm and volcanic eruptions. According to Holdaway et al.[@Holdaway-2014] having been disturbed during their measurement interval.""","20,21",D. Laughlin (d.laughlin@waikato.ac.nz),Plots are 20 x 20 m.
NSW,Australia,NFI,0.075 to 0.36 ha,10 cm,30,"Wood density, and Maximum height",local,The plot network was initially established in the 60s with different level of selection harvesting[@Kariuki-2006].,"1,2",R. M. Kooyman (robert@ecodingo.com.au),Permanents plots established by the NSW Department of State Forests or by RMK
% Some elements for the reply to the referees of Nature.
% Georges Kunstler
# Referee 1
## Competitive effect is not important for population level competitive outcomes
>***The authors state in the introduction that the existing gap in the
>literature is the translation between species traits and the
>competitive outcomes between species. I could not agree more. But not
>all the metrics tested in this study are drivers of competitive
>outcomes. In most models of competition, competitive outcomes between
>a pair of species will be determined by maximal growth, and tolerance
>of competition, so I am fine with these metrics. I am also fine with
>the authors analysis of competitive effect, but they should
>acknowledge that in nearly all models of competition, competitive
>effect (separated from competitive tolerance) almost never determines
>competitive dominance (i.e. if one species casts deep shade, this does
>not favor that species in competition unless individuals of its
>species can tolerate the shade it casts- that is why tolerance is the
>key trait).***
The core of our analysis is to predict how competition reduces individual tree basal area growth. Our results have implication for population growth and coexistence, but basal area growth is only a part of the population processes. So our results cannot provides definitive answers at the population level. We need to clarify in the main text this distinction between individual basal area growth and population growth level. I propose to have a section at the end of the main text on the population level consequences of our results. In this section we could discuss the point about competitive effect raised by the referee.
Competitive effect is clearly important for the basal area growth. Its
role on population dynamics may be less important, at least in
relatively simple population models but it is unclear whether this
hold true for more complex models. For instance, this is true for the
classical $R^*$, as $R^*$ (which determines the winner) do not vary with
consumption rate. Goldberg 1996 also states the same idea
for a Mac Arthur consumer-resource model[^Goldberg]. An approach based on the invasion criteria for coexistence would
indicate that the competitive effect of the invader is not important
for his success but the one of the resident maybe. For instance,
Tilman (1990 in Grace book) shows that for alternative more complex R*
models, the parameters related to effect on resource influences the
$R^*$. For size-structured model, the $Z^*$ paper (Adams et al. 2007)
based on the PPA model, provides some information. The response to
light in term of growth and survival are crucial for the competition
outcomes ($Z^*$), but tree height allometry is also important, then
light transmission, and crown radius can also have an influences (all
these last parameters influence competition effect on light).
In this last section on population level consequences, I propose thus to discuss the role of competitive effect along these lines (but short). Then we can have a detail reply for the referee along the ideas presented above showing that there is a tendency for no strong importance of competitive effect, but this may depend of the model. If you have more ideas on this points let me know.
[^Goldberg]: "Consistent with this argument, using Mac- Arthur's
(1972) consumer-resource equations, J. H. Vandermeer & D. E. Goldberg
(unpublished results) show that ability of individuals to deplete
resources is irrelevant to the equilibrium outcome of competition for
a single resource and only ability to tolerate low levels of the
resource determines the outcome."
## Need to estimate stabilising niche differences
>***My much bigger concern is with the authors' test of limiting similarity. I think asking whether the trait difference causes the interspecific interaction coefficient to decline is really only part of the problem. The reason we expect limiting similarity in communities is because trait differences translate into the niche differences that stabilize the interaction between competitors. And while the interaction coefficients tested in this study are certainly part of the niche difference, what determines the outcome of competition is the strength of the interspecific interactions relative to the intraspecific interactions, not the interspecific interaction alone.***
This comment as the previous one is focusing on the population level consequence of our results as it focus on coexistence.
The stabilising niche differences as defined by Chesson (and used in Kraft et al. 2014 and Godoy and Levine 2014) can only be evaluated at the population level, so our individual basal area growth will only provides part of the answer. The stabilising niche differences is defined as $\rho = \sqrt{\frac{\alpha_{ij}\alpha_{ji}}{\alpha_{jj} \alpha_{ii}}}$ in Chesson (2012) as the ratio of competition intra- vs inter-specific ($\frac{\alpha_{ij}}{\alpha_{jj}}$) determines the coexistence.
This is related to the classical stabilising vs equalising processes of Chesson. He shows that for a pair of species, the criteria for both of them having positive fitness when rare invader can be related to two key quantities: the stabilising niche overlap (stabilising process: $\rho = \sqrt{\frac{\alpha_{ij}\alpha_{ji}}{\alpha_{jj} \alpha_{ii}}}$) and the fitness differences ($\kappa_i / \kappa_j$ :equalising process in Chesson). The pdf show how this is computed within in Lotka-Volterra model, to see how this connects with our analysis.
As acknowledge by the referee computing that is impossible for our model as it is not a population growth rate model but just an individual tree basal area growth model. So it is not possible to compute the fitness of a rare invader. We can try to apply the same approach instead of computing $\rho$ as the ratio of population level inter intra alpha compute $\rho$ as the ratio of inter intra alpha based on basal area growth (alpha estimated as the basal area growth reduction in intra or inter).
The question is how to estimate these inter intra alpha.
1) The first solution is to predicted the inter intra alpha based on the traits model we used to predict alpha in our analysis. The attached pdf show that this results to $\rho = e^{-\alpha_s \vert t_i - t_j \vert}$.
2) The second solution is to have the same approach but using the
alternative model proposed by the referee 3 where $\alpha_0$ is
divided in $\alpha_{0 intra}$ and $\alpha_{0 inter}$. The attached pdf
show that this results in $\rho = e^{-(\alpha_{0,inter} -
\alpha_{0,intra} + \alpha_s \vert t_j - t_i \vert)}$. This alternative
model show that the stabilising niche process are in fact not related
to the three traits analysed.
3) Then this sentence of the referee *“if so, only analyse the sample pairs with the best fit parameters”* make me wander if he is not asking to estimate all the $\alpha_{ij}$ separately and then compute $\rho$ for each pairs and model $\rho$ as a function of traits as in Kraft et al (2014) (not Kraft et al. is based on an experiment on annual plant fully replicated per pair of species). This would be almost impossible as the number of co-occurrence between pairs of species can be very low particularly in species rich forest. I have tried at the start of the project to handle that with random effect in $\alpha$ in HB but never get the model to work well. It is not totally clear for me if the results can be very different with this approach. In addition the originality of our approach is to be able to directly relate alpha to traits.
So I propose to add the derivation of $\rho$ based on the approach 1
and 2 above and a figure of this prediction in Suppl Mat. Then in the
main text in the section on population level consequences discuss the
fact that intra/inter and alpha_s show that there is evidence of lower
inter than intra-specific competition for basal area growth, but that this is largely
disconnected from traits. The impact at the population level is more complex In the reply to the referee explain why estimating the $\alpha_{ij}$ separately is not possible and that our approach is a good solution for that.
## Fitness inequality
> ***Is there a way to show the net effect of trait differences on competitive outcomes? One can certainly do this with a defined model of competition (which I do not expect the authors to have), but it would be nice for the reader to have a sense that though the trait difference per se leads to lower interaction coefficients, the species with the optimal trait value for tolerating competition will still win, or something like that. Otherwise, statements suggesting that the limiting similarity effect is weak are harder to back up.***
The new analysis proposed by the referee 3 with different $\alpha_0$
for intra inter clearly show that the effect of trait similarity is
weak. Estimating the fitness inequality effect on the population
growth rate is not possible as discuss above for niche stabilising process.
I have try to come up with a solution by comparing the growth of species I in a stand of
species J to growth of species J in a stand of species J. This would
be based on the idea that ranking of their growth will influence their
competitive success. The attached pdf show a derivation showing how
this ratio can be decomposed in a function of $\rho$ and basal area
and quantity related to growth differences (in function the basal
area). The issue is that this growth ratio changes with the the amount of
basal area of competitor considered. So I'm not planning to include
that in the MS.
## Hmax
> ***In Fig. 2, taller plants do not seem to have greater competitive effects than shorter plants. Given the general sense in the literature that light competition is important in forests worldwide, I would spend some time explaining this. Similarly, what could explain limiting similarity based on maximum height (light competition does not lend itself to niche differentiation)?***
I propose to add some lines on that in the main text. In an analysis on short-term effect of competition on tree growth with a competition index that is already accounting for tree size this is not surprising that there is few effect of Hmax. However in a size-structured population model this maximum height would have a strong effect, on the population competitive interaction, see the Z* from the PPA.
For the limiting similarity effect of Hmax this is less clear. The
fact that the limiting similarity effect shrink when $\alpha_0$ is
divided in intra inter support the idea that this effect is not
directly related to the trait similarity but to its correlation to
intra inter and that processes such as species specific pathogen and
herbivore may be the key.
# Referee 2
# HB vs ML
>***My main comment relates to the modelling approach taken. The authors use linear mixed models to fit the parameter. It seems that a hierarchical Bayes approach could be more suitable here, as followed by Lasky et al. (2014) who addressed similar questions, but focused on tree mortality rather than growth. Can the authors provide justification for the approach used?***
In my view, the main arguments for using HB is when it is impossible
to do that in ML (for instance because we need to use non linear
form, complex error distribution, ...), or it is much more easy to
get confidence interval (the estimate of the confidence interval may
vary between ML and HB as there is no normal assumption in
HB). Estimating the same model in maximum likelihood (ML) or
hierarchical Bayesian (HB) with vague prior should give
(asymptotically) exactly the same results (uniformative normal prior
with normal error distribution are conjugate and gives normal
posterior). In our case I did try to fit the model in HB (jags or
stan) but never get a good convergence with the full data. With a
subsample of data ML and HB estimation result in almost identical
results (see figure below), but I’m reluctant to add that in Suppl Mat.
![Comparison of jags vs lmer estimates of the parameters for the simple global model.](../../figs/lmer_vs_jags.pdf)
\pagebreak
>***line 114-122: this is essentially the framework presented in Lasky
>et al. (2014) in a similiar study on tree survival, but that
>reference (#10) is one of those mentioned in this section.***
I clarified that in the method and added this footnote.
"There has been different approach to model $\alpha$ from traits. In one of the first study Uriarte et al. (2010) modelled $\alpha$ as $\alpha =
\alpha_0 + \alpha_s \vert t_f-t_c \vert$. Then in Kunstler et al. (2012) used two different models: $\alpha = \alpha_0 + \alpha_s \vert t_f-t_c \vert$ or $\alpha =
\alpha_0 + \alpha_h ( t_f-t_c )$. Finally, Lasky et al. (2014) developped one single model inculding multiple-processes as $\alpha =
\alpha_0 + \alpha_t t_f +\alpha_h ( t_f-t_c ) + \alpha_s \vert t_f-t_c
\vert$. In this study, we extended this last model by considering that it was more clear to split
$\alpha_h (t_f - t_c)$ in $\alpha_t t_f + \alpha_e t_c$, which is
equivalent to the hierarchical distance if $\alpha_t = - \alpha_e$
(thus avoiding replication of $t_f$ effect through both $\alpha_h$ and
$\alpha_t$)."
## Succession
>***line 125-128: What successional stages of forests were included in
>this study? Only old-growth forests, The Luquillo plot is partially
>second-growth forests and I suspect this is also the case for some of
>the Japan plots. As the results focus on successional trade-offs,
>this aspect is very important to mention and account for in the
>results. Successional state of the forest will substantially affect
>tree growth rates and levels of neighborhood competition.***
Most of these forests are probably experiencing successional dynamics
due to some disturbance. We don't have quantitative information to
support that for all data set. We added
field evidences of disturbances and succession dynamics in the
presentation of the data set in the Suppl Mat and also age
distribution of the forest for several data set where it is available
(see below).
####Panama
Gap disturbances are common in the large 50ha BCI plot [see @Young-1991; @Hubbell-1999; @Lobo-2014]. Hubbell et al.[@Hubbell-1999] estimated that less than 30% of the plot experienced no disturbance over a 13-year period.
####Japan
The network of plot comprise 50% of old growth forest, 17% of old secondary forest and 33% of young secondary forest.
####Luquillo
The plot has been struck by hurricanes in 1989 and in 1998[@Uriarte-2009]. In addition, two-third of the plot is a secondary forest on land previously used for agriculture and logging[Uriarte-2009].
####M'Baiki
The plot network was established with three levels of harvesting and one control [@Ouedraogo-2013].
####Fushan
Fushan experienced several Typhoon disturbances in 1994 with tree fall events, the main effect was trees defoliation[@Lin-2011].
####Paracou
The plot network was established with three levels of harvesting and one control (Herault et al. 2010).
####France
French forests monitored by the French National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below).
####Spain
Spanish forests monitored by the Spanish National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. No data are available on the age structure of the plots."""
####Swiss
Swiss forests monitored by the Swiss National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below)."""
####Sweden
Swedish forests monitored by the Swedish National Forest Inventory experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Vilen et al.[@Vilen-2012] shows that young forests represents a significant percentage of the forested area (see age distribution below)."""
####USA
US forests monitored by the FIA experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Pan et al.[@Pan-2011] shows that young forests represents a significant percentage of the forested area (see age distribution below).
#### Canada
Canadian forests monitored by the regional forest monitoring programs experience several types of natural disturbances (such as wind, forest fire, and bark beetles) and harvesting. The age structure reconstructed by Pan et al.[@Pan-2011] shows that young forests represents a significant percentage of the forested area (see age distribution below).
#### NZ
New Zealand forests are experiencing disturbance by earthquake,
landslide, storm and volcanic eruptions. According to Holdaway et
al.[@Holdaway-2014] having been disturbed during their measurement
interval.
#### NSW
The plot network was initially established in the 60s with different level of selection harvesting[@Kariuki-2006].
\pagebreak
#### Age distribution of some forest data analysed.
![Age distribution of forest area in 20-year age class for France, Switzerland and Sweden, estimated by Vilen et al.[@Vilen-2012]. The last class plotted at 150 years is for age > 140 years (except for Sweden where the last class 110 is age > 100 years).](../../figs/age_europe.pdf)
![Age distribution of forest area in 20-year age class for North America (USA and Canada), estimated by Pan et al.[@Pan-2011]. The last class plotted at 150 years is for age > 140 years.](../../figs/age_na.pdf)
I addition will add a sentence on the main text to state this idea.
\pagebreak
# Referee 3
## Intra Inter
>***As I understand the methods, conspecifics and heterospecifics are distinguished only on the basis of their traits. That means that a plot dominated by conspecifics will have very high trait similarity. As a result, estimates of the trait similarity effect, alpha_s, may not reflect trait differences as much as the relative abundance of conspecifics (and the many sources of conspecific density dependence unrelated to functional traits). I think the solution may be straightforward: replace alpha_0 with two terms, an alpha_0,conspecific and an alpha_0,heterospecific. The remaining alpha terms should only reflect the influence of heterospecific neighbors (the trait similarity calculation should not include the conspecific neighbors). An alternative would be to keep the current terms but add a term for relative abundance of conspecifics. However, this covariate will probably be highly correlated with the trait similarity covariate.***
>***If this alternative model gives qualitatively similar results to the original model, it could be described only in the supplementary information. But I suspect that the estimates of alpha_s from this model will be much smaller than in the current model. This result would actually strengthen the main argument of the paper, which states that the limiting similarity effects are much weaker than the competitive impact/response effects. To my eye, this difference does NOT appear clearly in Fig. 2, and the argument seems like a stretch. In fact, for maximum height, alpha_s is the only effect with a confidence interval that does not overlap zero. Again, I expect this result will change once the conspecific-heterospecific contrast is disentangled from the trait similarity effects.***
The results of the new analysis proposed by the referee 3 is presented below.
![Result with alpha0 for intra inter (model including MAT and MAP see below).](../../figs/figres12_TP_intra.pdf)
As guessed by the referee the trait similarity effect disappear. My
proposition is to still keep the original results in the main text and
add this figure in Extended data. Then in the main text use this
additional figure to explain that the traits similarity is not related
to a direct effect of traits similarity but only to the distinction
between intra inter (and thus processes independant of the traits).
In my view most field and theorethical studies have approached the
effect of traits similarity by lumping together intra- inter (but see
Scheffer and Van Nes (2006 PNAS) for a theorethical example of intra
inter competition kernel), so this important to keep this more
classical analysis, but use the intra inter one to show the meaning of $\alpha_s$.
## Interactions between environment and competition
> ***Jim Clark's recent papers on high-dimensional coexistence and Simpson's paradox argue that simple trade-offs should be elusive because of the importance of complex interactions between species (or traits), competition, and the environment which operate at the level of the individual. Yet the main result of this paper is amazing consistency in trait-mediated trade-offs. It is surprising to me that the results are not more context-dependent. Why don't certain environments favor some trait values, while different environments favor the opposite values? If nothing else, this lack of context dependence should be a discussion point. But in order to accept the authors' interpretation without reservations I would like some reassurance that the aggregated responses featured in this paper are not masking more complex interactions.***
>***Let me make two observations about the analysis that are related to this issue. First, the analysis makes the implicit assumption that differences in neighborhood composition (i.e. high vs low competition) within a data set are not related to the environment. In other words, if one individual tree is growing in a dense neighborhood and another tree is growing in an uncrowded neighborhood, that difference must reflect disturbance history and not some unobserved difference in abiotic factors, such as shallow soils that limit productivity on the uncrowded site. This assumption is the basis for the argument that the trait-mediated trade-offs are acting on variation in successional status. Couldn't the same argument be made for other more static, less dynamic sources of spatial heterogeneity?***
This is a correlative study, so we cannot be certain whether these are
direct mechanistic effects of the traits, versus effects of something
else that is correlated with the traits. We included a random plot
effect in Gmax to account for spatial variability in local
productivity.
I re-ran a model where the direct effect of MAT and MAP was
include, to show that our results are robust to accounting for
additional abiotic variables (see the
following figure).
![Result with MAT and MAP effect on Gmax.](../../figs/figres12_TP.pdf)
These new results are very close to the previsous one, the main
differences are that the CI of direct effect of SLA intercept zero (it
was very close before) and that the CI of the competitive effect of wood density
do not intercept zero any more, it was close to zero before. I rpopose
to use this new analysis with MAT MAP. This will require some
modification of the text to account for that (and change the figure
for the trade-off as it occur now only for wood density and not any
more for SLA).
<!-- Then we can add a figure with a boxplot of the total basal area per -->
<!-- plot/quadrat for each data set, as presented below to show that we -->
<!-- have a large range in all data set, going close to -->
<!-- zero. -->
<!-- ![Boxplot of total basal area per data set.](../../figs/boxplot_batot_set.pdf) -->
In addition the new informations on disturbance and forest age in
Suppl Mat provided for the referee 2 support a strong role of
disturbance and succession dynamics in most forests.
## Random effects
>***My second, related observation has to do with the structure of the random effects. The model does include random effects for species, plot and data set on the maximum growth rate. This accounts for latent environmental variation among plots that could influence intrinsic growth rates, but not in the effects of competition. There are also random effects on competitive effect and tolerance at the level of the data set, but not plot. So the assumption is that competition will operate in a consistent way across plots within a data set. As a result, I think it would be impossible to observe trait by environment interactions; competition on low neighborhood plots is assumed to operate the same way that it does on more crowded plots.***
The analysis with a fixed bionmes effect is already exploring this
question of variation of the competitive effect between biomes, but
this is at a large scale. The proposition of the referee of including
a plot random effect in the competition parameters is not possible as to few
plot have multiple census with large variation of local basal area
between census to
estimate an alpha per plot. I re-ran an analysis where we added a random effect
in the alphas parameters with both data set and local ecoregion
(Koppen-Geiger climatic zones which is much more narrow than the
biomes from Kriticos, D.J., Webber, B.L., Leriche, A., Ota, N.,
Macadam, I., Bathols, J. & Scott, J.K. (2012) CliMond: global high
resolution historical and future scenario climate surfaces for
bioclimatic modelling. Methods in Ecology & Evolution 3: 53-64.). The
results below show that the mean effect is similar.
![Result with koppen x data set random effect in $\alpha$ parameters.](../../figs/figres12_ecocode_TP.pdf)
I'm not sure if we need to add this in Suppl Mat or just in the reply
to the referee.
\pagebreak
>My wandering argument should make it clear that I have not thought
>this all the way through. I am just worried that the conclusions of
>the analysis might be sensitive to these kinds of assumptions. I
>would be appeased by more information on model selection. Are models
>with plot level random effects on the competition terms any better?
>If model convergence is a problem, perhaps this alternative model
>could be tested on the richest data sets? This type of model
>comparison could offer additional evidence for the impressive lack of
>context dependence in the results.
I propose to add a few sentence highlighting this surpising lack of
contex dependence and proposing that this may be related to the
dominant effect of competition for light in all these biomes.
% Derivation of $\rho$.
<!-- % Georges Kunstler -->
# Appendix derivation of $\rho$
To start, I will describe briefly what was
the approach of Kraft et al. (2014) based on Chesson to see how our analysis can
fit with that.
### The stabilising niche similarity (and equalising) of Chesson 2012
The approach of Chesson (2000, 2012) and then Kraft et al. (2015) (and many
other, see Godoy and Levine 2014) to estimate the stabilising niche difference and average fitness
difference rely on estimating the **population** growth rate of a rare
invader (species $i$) in an equilibrium community of a resident
species (species $j$). To understand this approach the simplest
solution is to take the Lotka-Volterra equation (as presented in
Godoy and Levine 2014 Ecology):
\begin{equation}
\frac{dN_i}{dt} = N_i \times r_i \times (1 - \alpha_{ii} N_i -
\alpha_{ij} N_j)
\end{equation}
The criteria for invasion of species $i$ in resident community of species $j$ is (at equilibrium population of single resident $j$ is
$\overline{N_j} = \frac{1}{\alpha_{jj}}$):
\begin{equation}
(1 - \frac{\alpha_{ij}}{\alpha_{jj}})
\end{equation}
Thus if $\frac{\alpha_{ij}}{\alpha_{jj}} <1$ invasion $i$ in $j$ is possible (same approach for $j$ in $i$).
The stabilising niche process for species $i$ in regard to species $j$ is thus defined as
$\frac{\alpha_{ij}}{\alpha_{jj}}$. Then Chesson (2012) split the likelihood of coexistence in
two processes: stabilising processes and equalising processes. For that Chesson define the average
stabilising niche
overlap between species $i$ and $j$ (both way) as:
\begin{equation}
\rho = \sqrt{\frac{\alpha_{ij} \alpha_{ji}}{\alpha_{jj} \alpha_{ii}}}
\end{equation}
The average fitness difference measuring the equalising processes ($\frac{\kappa_j}{\kappa_i}$) is
then:
\begin{equation}
\frac{\alpha_{ij}}{\alpha_{jj}} = \frac{\kappa_j}{\kappa_i} \, \rho
\end{equation}
Thus $\frac{\kappa_j}{\kappa_i} = \sqrt{\frac{\alpha_{ij} \alpha_{ii}}{\alpha_{jj} \alpha_{ji}}}$
With this approach coexistence of $i$ and $j$ requires that :
\begin{equation}
\frac{\alpha_{ij}}{\alpha_{jj}} = \frac{\kappa_j}{\kappa_i} \, \rho <1
\end{equation}
and
\begin{equation}
\frac{\alpha_{ji}}{\alpha_{ii}} = \frac{\kappa_i}{\kappa_j} \, \rho <1
\end{equation}
thus:
\begin{equation}
\rho < \frac{\kappa_i}{\kappa_j} < \frac{1}{\rho}
\end{equation}
#### Derivation of $\rho$ for our basal area growth model
Our growth model is (see extended method for details):
\begin{equation}
G_{i,f,p,s,t} = G_{\textrm{max} \, f,p,s} \, D_{i,f,p,s,t}^{\gamma_f} \, e^{\left(\sum_{c=1}^{N_i} {-\alpha_{c,f} B_{i,c,p,s}}\right)}
\end{equation}
Clearly we can not use an approach based on the fitness of a rare
invader, as our model is not a population growth model. What we can do
is compare the basal area growth reduction by intra- vs inter-specific
competition[^note1].
The growth rate reduction via competition for a unit of competitor basal area[^scale] in our growth model can be defined by
\begin{equation}
e^{-\alpha_{c,f}}
\end{equation}
[^scale]: As we used scaled variable for the basal area of competitor this is not in $m^2/ha$ but this doesn't matter.
Following Chesson (2012) we can define $\rho$ as[^note1]:
\begin{equation}
\rho = \sqrt{\frac{e^{-\alpha_{ij}} e^{-\alpha_{ji}}}{e^{-\alpha_{jj}} e^{-\alpha_{ii}}}}
\end{equation}
[^note1]: But the meaning of this $\rho$ is not as clear because it is not based on the population growth of a rare invader.
If we develop our model of link between $\alpha$ and the traits within
the interspecific competition we get:
\begin{equation}
e^{\alpha_{i,j}} = e^{-(\alpha_{0,i} + \alpha_t t_i + \alpha_e t_j +
\alpha_s \vert t_i - t_j \vert)}
\end{equation}
For intra-specific competition we get:
\begin{equation}
e^{\alpha_{i,i}} = e^{-(\alpha_{0,i} + \alpha_t t_i + \alpha_e t_j)}
\end{equation}
Thus $\rho$ simplify to
\begin{equation}
\rho = \sqrt{\frac{e^{-\alpha_{ij}} e^{-\alpha_{ji}}}{e^{-\alpha_{jj}}
e^{-\alpha_{ii}}}} = e^{-\alpha_s \vert t_i - t_j \vert}
\end{equation}
So the stabilising niche similarity $\rho$ is directly related to $\alpha_s$. Whereas the referee 1 was not convince by that.
## Intra- *vs.* inter-specific competition
The referee 3 is asking to split the parameter $\alpha_0$ in two: 1)
one related to intra-specific competition $\alpha_{0,intra}$ and 2) one related to the inter-specific competition $\alpha_{0,inter}$. This point is raised because he is concern that a large proportion of the $\alpha_s$ parameter could be related only to the difference between intra- *vs* inter-specific competition rather than the traits similarity.
This approach will consider that intra-specific competition is:
\begin{equation}
\alpha_{f,f} = \alpha_{0,intra} + \alpha_t \, t_f + \alpha_e \, t_f
\end{equation}
And inter-specific competition is:
\begin{equation}
\alpha_{f,c} = \alpha_{0,inter} + \alpha_t \, t_f + \alpha_e \, t_c + \alpha_s \, \vert t_c - t_f \vert
\end{equation}
Thus this would require to have competition index splitting conspecific and heterospecific.
\begin{equation}
\sum_{c=1}^{N_i} (\alpha_{f,c} B_c) = \alpha_{0,intra} B_f + \alpha_{0,inter} \sum_{c \neq f} B_c + \alpha_t t_f \sum_{c=1}^{N_i}(B_c) + \alpha_e \sum_{c=1}^{N_i}(t_c B_c) + \alpha_s \sum_{c \neq f}(\vert t_c - t_f \vert B_c)
\end{equation}
If we plug this into the estimation of the $\rho$ presented above this gives:
\begin{equation}
\rho = e^{-(\alpha_{0,inter} - \alpha_{0,intra} + \alpha_s \vert t_j - t_i \vert)}
\end{equation}
#### Estimation of fitness inequality
The idea would be to estimate what is driving species growth rate
differences and if these differences attenuate in inter-specific
rather than in intra-specific competition for two species $i$ and $j$.
The growth of a single tree of size ($D$) and species $i$ in a community of species $j$ with a given basal area ($B_j$) is given by:
\begin{equation}
G_{i \, j} = G_{\textrm{max} \, i} \, D^{\gamma_i} \, e^{-\alpha_{i,j} B_j}
\end{equation}
For $G_{j,j}$ we just need to replace $i$ per $j$ for the growth of species $j$ in the same community. Then the ratio of these to growth (developing the $\alpha_{i,j}$ as in the previous approach) is:
\begin{equation}
\frac{G_{i \, j}}{G_{j \, j}} = \frac{G_{\textrm{max} \, i}}{G_{\textrm{max} \, j}} \, e^{- \alpha_t (t_j - t_i) B_j} \, e^{- \alpha_s \vert t_j- t_i \vert B_j}
\end{equation}
Fitness inequality part would be defined by:
\begin{equation}
e^{m_1 (t_i-t_j) -(\alpha_t (t_i - t_j)) B_j}
\end{equation}
The problem is that this is a function $B_j$ the local basal area of competitor.
The stabilising process part would be related to $\rho$ defined above:
\begin{equation}
e^{- \alpha_s \vert t_j- t_i \vert B_j}
\end{equation}
Note that as pointed out by the referee 1 the parameter for
competitive effect $\alpha_e$ do not appears in any of this
equations. But this doesn't mean that it will have no impact on the
population dynamics.
## References
* Chesson, P. 2000. Mechanisms of maintenance of species diversity. -
Annual Review of Ecology, Evolution, and Systematics 31: 343–366.
* Chesson, P. 2012. Species competition and predation. - In:
Ecological Systems. Springer, pp. 223–256.
* Godoy, O. and Levine, J. M. 2014. Phenology effects on invasion success: insights from coupling field experiments to coexistence theory. - Ecology 95: 726–736.
* Kraft, N. J. B. et al. 2015. Plant functional traits and the multidimensional nature of species coexistence. - Proceedings of the National Academy of Sciences 112: 797–802.
......@@ -61,6 +61,12 @@ writeLines(unlist(list.t[dat[["Country"]]]))
![Age distribution of forest area in 20-year age class for North America (USA and Canada), estimated by Pan et al.[@Pan-2011]. The last class plotted at 150 years is for age > 140 years.](../../figs/age_na.pdf)
# Supplementary results
![**Global trait effects and trait-independent effects on maximum growth and competition and their variation among biomes for a model with random structure in the parameter including the data set and the Koppen-Geiger ecoregion.** Standardized regression coefficients for growth models, fitted separately for each trait (points: mean estimates and lines: 95\% confidence intervals). Black points and lines represent global estimates and coloured points and lines represent the biome level estimates. The parameter estimates represent: effect of focal tree's trait value on maximum growth ($m_1$), the competitive effect independent of traits ($\\alpha_{0}$), the effect of competitor trait values on their competitive effect ($\\alpha_e$) (positive values indicate that higher trait values lead to a stronger reduction in growth of the focal tree), the effect of the focal tree's trait value on its tolerance of competition($\\alpha_t$) (positive values indicate that greater trait values result in greater tolerance of competition), and the effect on competition of trait similarity between the focal tree and its competitors ($\\alpha_s$) (negative values indicate that higher trait similarity leads to a stronger reduction of the growth of the focal tree). Tropical rainforest and tropical seasonal forest were merged together as tropical forest, tundra was merged with taiga, and desert was not included as too few plots were available (see Fig 1a. for biomes definitions).](../../figs/figres12_ecocode_TP.pdf)
# Supplementary discussion
## Trait effects and potential mechanisms
......
......@@ -99,11 +99,14 @@ pandoc.table(cor.mat,
## ![Variation of the four parameters linking the three studied traits with maximum growth and competition - maximum growth ($t_f \, m_1$), tolerance to competition ($t_f \, \alpha_t$), competitive effect ($t_c \, \alpha_e$) and limiting similarity ($|t_f - t_c| \, \alpha_l$ ($t_c$ was fixed at the lowest value and $t_f$ varying from quantile 5 to 95\%). The shaded area represents the 95% confidence interval of the prediction (including uncertainty associated with $\alpha_0$ or $m_0$).](../../figs/figres4b.pdf)
## ![**Global trait effects and trait-independent effects on maximum growth and competition and their variation among biomes.** Standardized regression coefficients for growth models, fitted separately for each trait (points: mean estimates and lines: 95\% confidence intervals). Black points and lines represent global estimates and coloured points and lines represent the biome level estimates. The parameter estimates represent: effect of focal tree's trait value on maximum growth ($m_1$), the competitive effect independent of traits for intra- ($\\alpha_{0, intra}$) and inter-specific interaction ($\\alpha_{0, inter}$), the effect of competitor trait values on their competitive effect ($\\alpha_e$) (positive values indicate that higher trait values lead to a stronger reduction in growth of the focal tree), the effect of the focal tree's trait value on its tolerance of competition($\\alpha_t$) (positive values indicate that greater trait values result in greater tolerance of competition), and the effect on competition of trait similarity between the focal tree and its competitors ($\\alpha_s$) (negative values indicate that higher trait similarity leads to a stronger reduction of the growth of the focal tree). Tropical rainforest and tropical seasonal forest were merged together as tropical forest, tundra was merged with taiga, and desert was not included as too few plots were available (see Fig 1a. for biomes definitions).](../../figs/figres12_TP_intra.pdf)
##+ ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE
list.all.results <-
readRDS.root('output/list.lmer.out.all.NA.simple.set.rds')
lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species
mat.param <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.param, list.res = list.all.results,
......@@ -158,6 +161,39 @@ pandoc.table(mat.param[c(1,3,2,4:11), ], caption = "Standardized parameters esti
##+ ComputeTable_EffectsizeINTRA, echo = FALSE, results = 'hide', message=FALSE
list.all.results.intra <-
readRDS.root('output/list.lmer.out.all.NA.intra.set.rds')
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.MAT.MAP.intra.r.set.species',
param.vec = c("(Intercept)", "logD", "Tf","sumBn.intra",, "sumBn.inter",
"sumTnBn","sumTfBn", "sumTnTfBn.abs")))
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.MAT.MAP.intra.r.set.species',
param.vec = c("(Intercept)", "logD", "Tf","sumBn.intra","sumBn.inter",
"sumTnBn","sumTfBn", "sumTnTfBn.abs")))
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, 3),
')'), ncol = 3)
mat.param <- rbind(mat.param.mean.sd)
colnames(mat.param) <- c('Wood density', 'SLA', 'Maximum height')
row.names(mat.param) <- c('$m_0$', '$\\gamma$', '$m_1$', '$\\alpha_{0,intra}$', '$\\alpha_{0,inter}$',
'$\\alpha_e$', '$\\alpha_t$',
'$\\alpha_s$')
##+ Table2_EffectsizeINTRA, echo = FALSE, results='asis', message=FALSE
pandoc.table(mat.param[c(1,3,2,4:11), ], caption = "Standardized parameters estimates and standard error (in bracket) estimated for each trait for a model with separate $\\alpha_0$ for intraspecific and interspecific competition",
digits = 3, justify = c('left', rep('right', 3)),
emphasize.strong.cells = bold.index, split.tables = 200)
......@@ -10,8 +10,6 @@
Number = {2},
Pages = {135--45},
Volume = {10},
Doi = {10.1111/j.1461-0248.2006.01006.x},
Keywords = {Adaptation, Physiological,Ecosystem,Models, Biological,Plants,Plants: anatomy \& histology,Population Dynamics,Species Specificity}
}
......@@ -23,9 +21,6 @@
Number = {10},
Pages = {1294--1306},
Volume = {16},
Doi = {10.1111/ele.12157},
Editor = {Scherber, Christoph}
}
@Article{Aiba-2009,
......@@ -46,8 +41,6 @@
Number = {7486},
Pages = {85--88},
Volume = {506},
Doi = {10.1038/nature12911}
}
@Article{Baraloto-2010,
......@@ -57,9 +50,6 @@
Year = {2010},
Pages = {1338--1347},
Volume = {13},
Doi = {10.1111/j.1461-0248.2010.01517.x},
Keywords = {2010,ecology letters,functional diversity,leaf economics,multiple factor analysis,plant strategies,plant traits,tropical forest,wood density}
}
@Article{Bates-2014,
......@@ -110,8 +100,6 @@
Number = {4},
Pages = {351--66},
Volume = {12},
Doi = {10.1111/j.1461-0248.2009.01285.x}
}
@Book{Condit-1998,
......@@ -129,8 +117,6 @@
Number = {13},
Pages = {5064--5068},
Volume = {110},
Doi = {10.1073/pnas.1218042110}
}
@Article{Condit-1993,
......@@ -141,8 +127,6 @@
Number = {1{\textendash}4},
Pages = {107--122},
Volume = {62},
Doi = {10.1016/0378-1127(93)90045-O}
}
@Article{Cornelissen-1996,
......@@ -325,8 +309,6 @@
Number = {6179},
Pages = {242--243},
Volume = {334},
Doi = {10.1038/334242a0}
}
@InCollection{Goldberg-1990,
......@@ -378,13 +360,24 @@
Number = {4},
Pages = {981--990},
Volume = {99},
}
Doi = {10.1111/j.1365-2745.2011.01829.x}
@article{Gourlet-Fleury-2013,
title = {Tropical forest recovery from logging: a 24 year silvicultural experiment from Central Africa},
volume = {368},
number = {1625},
journal = {Philosophical Transactions of the Royal Society B: Biological Sciences},
author = {Gourlet-Fleury, S. and Mortier, F. and Fayolle, A. and Baya, F. and Ouedraogo, D. and Benedet, F. and Picard, N.},
year = {2013},
pages = {20120302--20120302}
}
@Misc{Green-2009,
Title = {{USDA} {PLANTS} Compilation, version 1, 09-02-02.},
Author = {Green, W},
Note = {\url{http://bricol.net/downloads/data/PLANTSdatabase/}},
Year = {2009}
......@@ -438,8 +431,6 @@
Number = {4},
Pages = {821--831},
Volume = {47},
Doi = {10.1111/j.1365-2664.2010.01826.x}
}
@Article{Hijmans-2005,
......@@ -450,8 +441,6 @@
Number = {15},
Pages = {1965--1978},
Volume = {25},
Doi = {10.1002/joc.1276}
}
@Article{HilleRisLambers-2012,
......@@ -462,8 +451,6 @@
Number = {1},
Pages = {227--248},
Volume = {43},
Doi = {10.1146/annurev-ecolsys-110411-160411}
}
......@@ -502,8 +489,6 @@
Number = {6},
Pages = {1007--1008},
Volume = {26},
Doi = {10.1007/s11284-011-0847-y}
}
@Article{Kattge-2011,
......@@ -514,8 +499,6 @@
Number = {9},
Pages = {2905--2935},
Volume = {17},
Doi = {10.1111/j.1365-2486.2011.02451.x}
}
@Article{Kattge-2009,
......@@ -573,9 +556,6 @@
Number = {5},
Pages = {668--679},
Volume = {44},
Doi = {10.1111/j.1744-7429.2012.00861.x},
Keywords = {Australia,community phylogenetic structure,environmental gradients,functional traits,niche breadth,rain forest,scale,seed size}
}
@Article{Kooyman-2009,
......@@ -604,8 +584,6 @@
Number = {3},
Pages = {797--802},
Volume = {112},
Doi = {10.1073/pnas.1413650112}
}
@Article{Kraft-2010,
......@@ -679,8 +657,6 @@
Number = {15},
Pages = {5616--5621},
Volume = {111},
Doi = {10.1073/pnas.1319342111}
}
@Article{Laughlin-2010,
......@@ -722,9 +698,6 @@
Number = {6},
Pages = {299--303},
Volume = {23},
Doi = {10.1016/j.tree.2008.02.006},
Keywords = {Adaptation, Physiological,Adaptation, Physiological: physiology,Coniferophyta,Coniferophyta: physiology,Ecosystem,Evolution,Light,Plant Leaves,Plant Leaves: physiology}
}
@Article{MacArthur-1967,
......@@ -735,8 +708,6 @@
Number = {921},
Pages = {377--385},
Volume = {101},
Doi = {10.2307/2459090}
}
@Article{Martin-2007,
......@@ -757,9 +728,6 @@
Number = {9},
Pages = {1085--1093},
Volume = {13},
Doi = {10.1111/j.1461-0248.2010.01509.x},
Shorttitle = {Opposing effects of competitive exclusion on the phylogenetic structure of communities}
}
@Article{McDonald-2003,
......@@ -959,10 +927,6 @@
Number = {6},
Pages = {1459--1470},
Volume = {101},
Doi = {10.1111/1365-2745.12165},
Editor = {Turnbull, Matthew},
Shorttitle = {Slow-growing species cope best with drought}
}
@Article{Pakeman-2008,
......@@ -1104,8 +1068,6 @@
Number = {12},
Pages = {2626--2636},
Volume = {93},
Doi = {10.1890/12-0622.1}
}
@Article{Rees-2001,
......@@ -1182,8 +1144,6 @@
Number = {9},
Pages = {2479--2492},
Volume = {95},
Doi = {10.1890/13-1366.1}
}
@Article{Sapijanskas-2013,
......@@ -1223,9 +1183,6 @@
Number = {2},
Pages = {103--113},
Volume = {1},
Doi = {10.1111/j.2041-210X.2010.00012.x},
Shorttitle = {Simple means to improve the interpretability of regression coefficients}
}
@Article{Shipley-2002,
......@@ -1284,8 +1241,6 @@
Number = {5},
Pages = {1344--1363},
Volume = {12},
Doi = {10.2307/3099976}
}
@Article{Uriarte-2004,
......@@ -1353,8 +1308,6 @@
Number = {1},
Pages = {196--207},
Volume = {24},
Doi = {10.1111/j.1365-2435.2009.01612.x}
}
@Article{Westoby-2002,
......@@ -1365,9 +1318,6 @@
Number = {1},
Pages = {125--159},
Volume = {33},
Doi = {10.1146/annurev.ecolsys.33.010802.150452},
Keywords = {foliage height,leaf lifespan,leaf mass per area,leaf size,seed mass}
}
@Article{Willis-2010,
......@@ -1428,9 +1378,6 @@
Number = {6985},
Pages = {821--7},
Volume = {428},
Doi = {10.1038/nature02403},
Keywords = {Biomass,Climate,Ecosystem,Geography,Models, Biological,Nutritional Physiological Phenomena,photosynthesis,Plant Leaves,Plant Leaves: anatomy \& histology,Plant Leaves: chemistry,Plant Leaves: growth \& development,Plant Leaves: physiology,Rain}
}
@Article{Wright-2010,
......
......@@ -22,13 +22,13 @@ samplesize=$1
# "'Seed.mass'" "'Leaf.N'"
for trait in "'SLA'" "'Wood.density'" "'Max.height'" ; do
# # # ALL data 0
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.0[1], run.lmer,$trait);print('done')\"" > Rscript_temp/all0${trait}.sh
# qsub Rscript_temp/all0${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.0${trait}" -q opt32G -j oe
# # ALL data 0
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.0[1], run.lmer,$trait);print('done')\"" > Rscript_temp/all0${trait}.sh
qsub Rscript_temp/all0${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.0${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.0[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/all02${trait}.sh
# qsub Rscript_temp/all02${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.02${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.0[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/all02${trait}.sh
qsub Rscript_temp/all02${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.02${trait}" -q opt32G -j oe
# # ALL data 0b
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.0b[1], run.lmer,$trait);print('done')\"" > Rscript_temp/all0b${trait}.sh
......@@ -38,37 +38,37 @@ samplesize=$1
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.0b[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/all02b${trait}.sh
qsub Rscript_temp/all02b${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.02b${trait}" -q opt32G -j oe
# # # ALL data 1
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1[1], run.lmer,$trait);print('done')\"" > Rscript_temp/allf${trait}.sh
# qsub Rscript_temp/allf${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.f${trait}" -q opt32G -j oe
# # ALL data 1
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1[1], run.lmer,$trait);print('done')\"" > Rscript_temp/allf${trait}.sh
qsub Rscript_temp/allf${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.f${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/allf2${trait}.sh
# qsub Rscript_temp/allf2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.f2${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.1[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/allf2${trait}.sh
qsub Rscript_temp/allf2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.f2${trait}" -q opt32G -j oe
# # # ALL data 1
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.3[1], run.lmer,$trait);print('done')\"" > Rscript_temp/allTP${trait}.sh
# qsub Rscript_temp/allTP${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.TP${trait}" -q opt32G -j oe
# # ALL data 1
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.3[1], run.lmer,$trait);print('done')\"" > Rscript_temp/allTP${trait}.sh
qsub Rscript_temp/allTP${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.TP${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.3[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/allTP2${trait}.sh
# qsub Rscript_temp/allTP2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.TP2${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.3[2], merge.biomes.TF = TRUE, run.lmer,$trait);print('done')\"" > Rscript_temp/allTP2${trait}.sh
qsub Rscript_temp/allTP2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.TP2${trait}" -q opt32G -j oe
# # # INTRA 1
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.intra.1[1], run.lmer,$trait, data.type = 'intra');print('done')\"" > Rscript_temp/allINTRA${trait}.sh
# qsub Rscript_temp/allINTRA${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.INTRA${trait}" -q opt32G -j oe
# # INTRA 1
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.intra.1[1], run.lmer,$trait, data.type = 'intra');print('done')\"" > Rscript_temp/allINTRA${trait}.sh
qsub Rscript_temp/allINTRA${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.INTRA${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.intra.1[2], merge.biomes.TF = TRUE, run.lmer,$trait,data.type = 'intra');print('done')\"" > Rscript_temp/allINTRA2${trait}.sh
# qsub Rscript_temp/allINTRA2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.INTRA2${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.intra.1[2], merge.biomes.TF = TRUE, run.lmer,$trait,data.type = 'intra');print('done')\"" > Rscript_temp/allINTRA2${trait}.sh
qsub Rscript_temp/allINTRA2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.INTRA2${trait}" -q opt32G -j oe
# # # INTRA 2
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.intra.2[1], run.lmer,$trait, data.type = 'intra');print('done')\"" > Rscript_temp/allINTRAB${trait}.sh
# qsub Rscript_temp/allINTRAB${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.INTRAB${trait}" -q opt32G -j oe
# # INTRA 2
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.intra.2[1], run.lmer,$trait, data.type = 'intra');print('done')\"" > Rscript_temp/allINTRAB${trait}.sh
qsub Rscript_temp/allINTRAB${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.INTRAB${trait}" -q opt32G -j oe
# echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.intra.2[2], merge.biomes.TF = TRUE, run.lmer,$trait,data.type = 'intra');print('done')\"" > Rscript_temp/allINTRAB2${trait}.sh
# qsub Rscript_temp/allINTRAB2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.INTRAB2${trait}" -q opt32G -j oe
echo "/usr/local/R/R-3.1.1/bin/Rscript -e \"source('R/analysis/lmer.run.R'); run.multiple.model.for.set.one.trait(model.files.lmer.Tf.intra.2[2], merge.biomes.TF = TRUE, run.lmer,$trait,data.type = 'intra');print('done')\"" > Rscript_temp/allINTRAB2${trait}.sh
qsub Rscript_temp/allINTRAB2${trait}.sh -d ~/trait.competition.workshop -l nodes=1:ppn=1,mem=8gb -N "lmerall2all.INTRAB2${trait}" -q opt32G -j oe
# # # # # ecocode 3
......
......@@ -11,13 +11,18 @@ source("R/analysis/lmer.run.R")
## models = c(model.files.lmer.Tf.4, model.files.lmer.Tf.2),
## traits = c("SLA", "Wood.density", "Max.height"))
format.all.output.lmer(file.name = "NA.wwf.results.nolog.all.rds",
list.file.name = 'list.lmer.out.all.NA.simple.set.rds',
models = c(model.files.lmer.Tf.0, model.files.lmer.Tf.0b,
model.files.lmer.Tf.1, model.files.lmer.Tf.3),
format.all.output.lmer(file.name = "NA.koppen.results.nolog.all.rds",
list.file.name = 'list.lmer.out.all.NA.simple.set.null.rds',
models = c(model.files.lmer.Tf.0b),
traits = c("SLA", "Wood.density", "Max.height"))
## format.all.output.lmer(file.name = "NA.wwf.results.nolog.all.rds",
## format.all.output.lmer(file.name = "NA.koppen.results.nolog.all.rds",
## list.file.name = 'list.lmer.out.all.NA.simple.set.rds',
## models = c(model.files.lmer.Tf.0, model.files.lmer.Tf.0b,
## model.files.lmer.Tf.1, model.files.lmer.Tf.3),
## traits = c("SLA", "Wood.density", "Max.height"))
## format.all.output.lmer(file.name = "NA.koppen.results.nolog.all.rds",
## list.file.name = 'list.lmer.out.all.NA.intra.set.rds',
## models = c(model.files.lmer.Tf.intra.1,
## model.files.lmer.Tf.intra.2),
......
......@@ -65,7 +65,7 @@ plot.param.mean.and.biomes.fixed(list.all.results.set , data.type = "simple",
dev.off()
pdf('figs/figres12.intra.pdf', height = 14, width = 16)
pdf('figs/figres12_intra.pdf', height = 14, width = 16)
plot.param.mean.and.biomes.fixed(list.all.results.intra , data.type = "intra",
models = c('lmer.LOGLIN.ER.AD.Tf.intra.r.set.species',
'lmer.LOGLIN.ER.AD.Tf.intra.r.set.fixed.biomes.species'),
......@@ -89,7 +89,7 @@ dev.off()
pdf('figs/figres12.TP.pdf', height = 14, width = 16)
pdf('figs/figres12_TP.pdf', height = 14, width = 16)
plot.param.mean.and.biomes.fixed(list.all.results.set , data.type = "simple",
models = c('lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species',
'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.fixed.biomes.species'),
......@@ -110,7 +110,7 @@ plot.param.mean.and.biomes.fixed(list.all.results.set , data.type = "simple",
dev.off()
pdf('figs/figres12.TP.intra.pdf', height = 14, width = 16)
pdf('figs/figres12_TP_intra.pdf', height = 14, width = 16)
plot.param.mean.and.biomes.fixed(list.all.results.intra , data.type = "intra",
models = c('lmer.LOGLIN.ER.AD.Tf.MAT.MAP.intra.r.set.species',
'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.intra.r.set.fixed.biomes.species'),
......@@ -134,7 +134,7 @@ dev.off()
pdf('figs/figres12.ecocode.pdf', height = 14, width = 16)
pdf('figs/figres12_ecocode.pdf', height = 14, width = 16)
plot.param.mean.and.biomes.fixed(list.all.results.ecocode ,
data.type = "simple",
models = c('lmer.LOGLIN.ER.AD.Tf.r.ecocode.species',
......@@ -156,7 +156,7 @@ plot.param.mean.and.biomes.fixed(list.all.results.ecocode ,
dev.off()
pdf('figs/figres12.ecocode.TP.pdf', height = 14, width = 16)
pdf('figs/figres12_ecocode_TP.pdf', height = 14, width = 16)
plot.param.mean.and.biomes.fixed(list.all.results.ecocode ,
data.type = "simple",
models = c('lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.ecocode.species',
......@@ -186,7 +186,13 @@ pdf('figs/figres4.pdf', width = 8, height = 7)
fun.plot.wd.sl.param(list.all.results.set)
dev.off()
pdf('figs/figres4.TP.pdf', width = 8, height = 7)
pdf('figs/figres4_TP.pdf', width = 8, height = 7)
fun.plot.wd.sl.param(list.all.results.set,
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species',
MAT.MAP.TF = TRUE)
dev.off()
pdf('figs/figres4_TP.pdf', width = 8, height = 7)
fun.plot.wd.sl.param(list.all.results.set,
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species',
MAT.MAP.TF = TRUE)
......@@ -197,30 +203,37 @@ pdf('figs/figres4b.pdf', width = 8, height = 11)
fun.plot.all.param(list.all.results.set)
dev.off()
pdf('figs/figres4b.TP.pdf', width = 8, height = 11)
fun.plot.all.param(list.all.results.set, model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species',
pdf('figs/figres4b_TP.pdf', width = 8, height = 11)
fun.plot.all.param(list.all.results.set,
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species',
MAT.MAP.TF = TRUE)
dev.off()
pdf('figs/stabl.set.pdf')
pdf('figs/figres4b_TP_intra.pdf', width = 8, height = 11)
fun.plot.all.param(list.all.results.intra,
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species',
MAT.MAP.TF = TRUE, intra.TF = TRUE)
dev.off()
pdf('figs/stabl_set.pdf')
fun.plot.all.stabl(list.all.results.set,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species',
MAT.MAP.TF = FALSE)
dev.off()
pdf('figs/stabl.set.intra.pdf')
pdf('figs/stabl_set_intra.pdf')
fun.plot.all.stabl(list.all.results.intra,
model = 'lmer.LOGLIN.ER.AD.Tf.intra.r.set.species',
MAT.MAP.TF = FALSE, intra.TF = TRUE, data.type ='intra')
dev.off()
pdf('figs/rho.set.pdf')
pdf('figs/rho_set.pdf')
fun.plot.all.rho(list.all.results.set,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species',
MAT.MAP.TF = FALSE)
dev.off()
pdf('figs/rho.set.intra.pdf')
pdf('figs/rho_set_intra.pdf')
fun.plot.all.rho(list.all.results.intra,
model = 'lmer.LOGLIN.ER.AD.Tf.intra.r.set.species',
MAT.MAP.TF = FALSE, intra.TF = TRUE, data.type ='intra')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment