Commit 41e9c9a0 authored by Kunstler Georges's avatar Kunstler Georges
Browse files

process intra all

parent 63b3a6db
...@@ -637,7 +637,7 @@ pred.res.ae$pred <- -pred.res.ae$pred ...@@ -637,7 +637,7 @@ pred.res.ae$pred <- -pred.res.ae$pred
pred.res.ae$lwr <- -pred.res.ae$lwr pred.res.ae$lwr <- -pred.res.ae$lwr
pred.res.ae$upr <- -pred.res.ae$upr pred.res.ae$upr <- -pred.res.ae$upr
if(!intra.TF){ if(!intra.TF){
pred.res.a0 <- easyPredCI.param(list.res, type = 'alpha0', new.data, alpha, alpha_0) 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']], pred.res.a0$Tf <- seq(from = list.var[[1]][['ql.o']],
to = list.var[[1]][['qh.o']], to = list.var[[1]][['qh.o']],
...@@ -650,7 +650,7 @@ pred.res.a0$upr <- -pred.res.a0$upr ...@@ -650,7 +650,7 @@ 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)) return(rbind(pred.res.max, pred.res.ar, pred.res.ae, pred.res.al, pred.res.a0))
} }
#intra #intra
if(intra.TF){ if(intra.TF){
pred.res.a0.intra <- easyPredCI.param(list.res, type = 'alpha0', new.data, alpha, alpha_0 = 'sumBn.intra') 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']], pred.res.a0.intra$Tf <- seq(from = list.var[[1]][['ql.o']],
to = list.var[[1]][['qh.o']], to = list.var[[1]][['qh.o']],
...@@ -694,9 +694,9 @@ pred.res.rho$Tf <- seq(from = list.var[[1]][['ql.o']], ...@@ -694,9 +694,9 @@ pred.res.rho$Tf <- seq(from = list.var[[1]][['ql.o']],
to = list.var[[1]][['qh.o']], to = list.var[[1]][['qh.o']],
length.out = 100) - list.var[[1]][['ql.o']] length.out = 100) - list.var[[1]][['ql.o']]
pred.res.rho$param.type <- 'rho' pred.res.rho$param.type <- 'rho'
pred.res.rho$pred <- 1- exp(pred.res.rho$pred) pred.res.rho$pred <- 1- exp(-pred.res.rho$pred)
pred.res.rho$lwr <- 1 - exp(pred.res.rho$lwr) pred.res.rho$lwr <- 1 - exp(-pred.res.rho$lwr)
pred.res.rho$upr <- 1 - exp(pred.res.rho$upr) pred.res.rho$upr <- 1 - exp(-pred.res.rho$upr)
new.data.GiGj <- fun.generate.pred.param.kikj.dat( list.sd = list.res$list.sd, new.data.GiGj <- fun.generate.pred.param.kikj.dat( list.sd = list.res$list.sd,
Tf.low = list.var[[1]][['ql']], Tf.low = list.var[[1]][['ql']],
...@@ -728,9 +728,9 @@ pred.res.rho$Tf <- seq(from = list.var[[1]][['ql.o']], ...@@ -728,9 +728,9 @@ pred.res.rho$Tf <- seq(from = list.var[[1]][['ql.o']],
to = list.var[[1]][['qh.o']], to = list.var[[1]][['qh.o']],
length.out = 100) - list.var[[1]][['ql.o']] length.out = 100) - list.var[[1]][['ql.o']]
pred.res.rho$param.type <- 'rho' pred.res.rho$param.type <- 'rho'
pred.res.rho$pred <- 1 - exp(pred.res.rho$pred) pred.res.rho$pred <- 1 - exp(-pred.res.rho$pred)
pred.res.rho$lwr <- 1 - exp(pred.res.rho$lwr) pred.res.rho$lwr <- 1 - exp(-pred.res.rho$lwr)
pred.res.rho$upr <- 1 - exp(pred.res.rho$upr) pred.res.rho$upr <- 1 - exp(-pred.res.rho$upr)
new.data.GiGj <- fun.generate.pred.param.kikj.dat( list.sd = list.res$list.sd, new.data.GiGj <- fun.generate.pred.param.kikj.dat( list.sd = list.res$list.sd,
...@@ -1035,48 +1035,48 @@ for (i in traits[traits.print]){ ...@@ -1035,48 +1035,48 @@ for (i in traits[traits.print]){
extract.param <- function(trait, list.res, extract.param <- function(trait, list.res,
model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species', model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species',
param.vec = c("logD", "Tf","sumBn", "sumTnBn", param.vec = c("logD", "Tf","sumBn", "sumTnBn",
"sumTfBn", "sumTnTfBn.abs")){ "sumTfBn", "sumTnTfBn.abs"),
list.temp <- list.res[[paste("simple_", trait , data.type = 'simple'){
"_", model, list.temp <- list.res[[paste0(data.type, "_", trait ,
sep = '')]]$lmer.summary "_", model)]]$lmer.summary
param.mean <- list.temp$fixed.coeff.E[param.vec] param.mean <- list.temp$fixed.coeff.E[param.vec]
return(param.mean) return(param.mean)
} }
extract.param.sd <- function(trait, list.res, extract.param.sd <- function(trait, list.res,
model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species', model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species',
param.vec = c("logD", "Tf","sumBn", "sumTnBn", param.vec = c("logD", "Tf","sumBn", "sumTnBn",
"sumTfBn", "sumTnTfBn.abs")){ "sumTfBn", "sumTnTfBn.abs"),
list.temp <- list.res[[paste("simple_", trait , data.type = 'simple'){
"_", model, list.temp <- list.res[[paste0(data.type, "_", trait ,
sep = '')]]$lmer.summary "_", model)]]$lmer.summary
param.mean <- list.temp$fixed.coeff.Std.Error param.sd <- list.temp$fixed.coeff.Std.Error
names(param.mean) <- names(list.temp$fixed.coeff.E) names(param.sd) <- names(list.temp$fixed.coeff.E)
return(param.mean[param.vec]) return(param.sd[param.vec])
} }
extract.R2c <- function(trait, list.res, extract.R2c <- function(trait, list.res,
model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species'){ model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species',
list.temp <- list.res[[paste("simple_", trait , data.type = 'simple'){
"_", model, list.temp <- list.res[[paste0(data.type,"_", trait ,
sep = '')]]$lmer.summary "_", model)]]$lmer.summary
return(list.temp$R2c) return(list.temp$R2c)
} }
extract.R2m <- function(trait, list.res, extract.R2m <- function(trait, list.res,
model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species'){ model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species',
list.temp <- list.res[[paste("simple_", trait , data.type = 'simple'){
"_", model, list.temp <- list.res[[paste0(data.type,"_", trait ,
sep = '')]]$lmer.summary "_", model)]]$lmer.summary
return(list.temp$R2m) return(list.temp$R2m)
} }
extract.AIC <- function(trait, list.res, extract.AIC <- function(trait, list.res,
model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species'){ model = 'lmer.LOGLIN.ER.AD.Tf.r.biomes.species',
list.temp <- list.res[[paste("simple_", trait , data.type = 'simple'){
"_", model, list.temp <- list.res[[paste0(data.type,"_", trait ,
sep = '')]]$lmer.summary "_", model)]]$lmer.summary
return(list.temp$AIC) return(list.temp$AIC)
} }
...@@ -1546,7 +1546,7 @@ first.p <- 'alpha0' ...@@ -1546,7 +1546,7 @@ first.p <- 'alpha0'
if(intra.TF){ if(intra.TF){
expr.p.vec <- c(expression(paste('Trait indep ', alpha['0 intra/inter'])), expr.p.vec <- c(expression(paste('Trait indep ', alpha['0 intra/inter'])),
expression(paste('Trait indep ', alpha['0 intra/inter'])), expression(paste('Trait indep ', alpha['0 intra/inter'])),
expression(paste('Similarity ', alpha[l] %*% abs(t[f] - t[c]))), expression(paste('Similarity ', alpha[l] %*% abs(t[f] - t[c]))),
expression(paste('Competitive effect ', alpha[e] %*% t[c])), expression(paste('Competitive effect ', alpha[e] %*% t[c])),
expression(paste('Tolerance of competition ', alpha[t] %*% t[f])), expression(paste('Tolerance of competition ', alpha[t] %*% t[f])),
...@@ -1584,7 +1584,7 @@ if(p == 'maxG'){ ...@@ -1584,7 +1584,7 @@ if(p == 'maxG'){
col.vec = col.vec, col.vec = col.vec,
expr.param = expr.p.vec[p], cex.lab = 1.1, cex.axis =0.85, cex = 1, expr.param = expr.p.vec[p], cex.lab = 1.1, cex.axis =0.85, cex = 1,
ylim = ylim.list[[p]]) ylim = ylim.list[[p]])
} }
} }
} }
...@@ -1613,7 +1613,7 @@ if(p == 'maxG'){ ...@@ -1613,7 +1613,7 @@ if(p == 'maxG'){
expr.param = expr.p.vec[p], add.ylab.TF = FALSE, expr.param = expr.p.vec[p], add.ylab.TF = FALSE,
cex.lab = 1.1, cex.axis =0.85, cex = 1, cex.lab = 1.1, cex.axis =0.85, cex = 1,
ylim = ylim.list[[p]]) ylim = ylim.list[[p]])
} }
} }
} }
...@@ -1677,7 +1677,7 @@ first.p <- 'maxG' ...@@ -1677,7 +1677,7 @@ first.p <- 'maxG'
if(intra.TF){ if(intra.TF){
expr.p.vec <- c(expression(paste('Trait indep ', alpha['0 intra/inter'])), expr.p.vec <- c(expression(paste('Trait indep ', alpha['0 intra/inter'])),
expression(paste('Trait indep ', alpha['0 intra/inter'])), expression(paste('Trait indep ', alpha['0 intra/inter'])),
expression(paste('Similarity ', alpha[l] %*% abs(t[f] - t[c]))), expression(paste('Similarity ', alpha[l] %*% abs(t[f] - t[c]))),
expression(paste('Competitive effect ', alpha[e] %*% t[c])), expression(paste('Competitive effect ', alpha[e] %*% t[c])),
expression(paste('Tolerance of competition ', alpha[t] %*% t[f])), expression(paste('Tolerance of competition ', alpha[t] %*% t[f])),
...@@ -1773,10 +1773,10 @@ polygon(c(df.t[, 'Tf'], ...@@ -1773,10 +1773,10 @@ polygon(c(df.t[, 'Tf'],
c(df.t[, 'upr'], c(df.t[, 'upr'],
rev(df.t[, 'lwr'])), rev(df.t[, 'lwr'])),
col = add.alpha(col.vec[names.param[p]], 0.5), border = NA) col = add.alpha(col.vec[names.param[p]], 0.5), border = NA)
} }
if(add.ylab.TF){ if(add.ylab.TF){
if(p != 'alpha0.intra'){ if(p != 'alpha0.intra'){
mtext(expr.param, mtext(expr.param,
side=2, cex =cex, side=2, cex =cex,
line = 2.5, col = col.vec[names.param[p]]) line = 2.5, col = col.vec[names.param[p]])
...@@ -1922,7 +1922,7 @@ layout(m, heights=hei, widths= wid ) ...@@ -1922,7 +1922,7 @@ layout(m, heights=hei, widths= wid )
names(expr.p.vec) <- c('rho', 'kikj', 'GiGj') names(expr.p.vec) <- c('rho', 'kikj', 'GiGj')
names.param <- c("rho","kikj", 'GiGj') names.param <- c("rho","kikj", 'GiGj')
names(names.param) <- c('rho', 'kikj', 'GiGj') names(names.param) <- c('rho', 'kikj', 'GiGj')
col.vec <- c('green', 'red', 'blue') col.vec <- c('#018571', '#a6611a', '#dfc27d')
names(col.vec) <- c("rho","kikj", 'GiGj') names(col.vec) <- c("rho","kikj", 'GiGj')
for (t in c('Wood density', 'Specific leaf area', 'Maximum height')){ for (t in c('Wood density', 'Specific leaf area', 'Maximum height')){
for (p in c('rho', 'kikj', 'GiGj')){ for (p in c('rho', 'kikj', 'GiGj')){
...@@ -1970,7 +1970,7 @@ if(t == 'Maximum height'){ ...@@ -1970,7 +1970,7 @@ if(t == 'Maximum height'){
if(t == 'Wood density'){ if(t == 'Wood density'){
if(p == 'GiGj'){ if(p == 'GiGj'){
fun.plot.param.tf(df = df.t, fun.plot.param.tf(df = df.t,
p = p, p = p,names.param = names.param,
ylim = range(filter(df.t, ylim = range(filter(df.t,
param.type == 'GiGj')%>% select(upr,lwr)), param.type == 'GiGj')%>% select(upr,lwr)),
xlab = expression(paste(Delta, ' Wood density (mg m', m^-3, ')')), xlab = expression(paste(Delta, ' Wood density (mg m', m^-3, ')')),
...@@ -1978,7 +1978,7 @@ if(p == 'GiGj'){ ...@@ -1978,7 +1978,7 @@ if(p == 'GiGj'){
expr.param = expr.p.vec[p], cex.lab = 1.1, cex.axis =0.85, cex = 1) expr.param = expr.p.vec[p], cex.lab = 1.1, cex.axis =0.85, cex = 1)
}else{ }else{
fun.plot.param.tf(df = df.t, fun.plot.param.tf(df = df.t,
p = p, p = p, names.param = names.param,
ylim = range(filter(df.t, ylim = range(filter(df.t,
param.type == p)%>% select(upr,lwr)), param.type == p)%>% select(upr,lwr)),
xaxt= 'n',xlab = NA, xaxt= 'n',xlab = NA,
...@@ -2010,7 +2010,7 @@ if(p == 'GiGj'){ ...@@ -2010,7 +2010,7 @@ if(p == 'GiGj'){
if(t == 'Maximum height'){ if(t == 'Maximum height'){
if(p == 'GiGj'){ if(p == 'GiGj'){
fun.plot.param.tf(df = df.t, fun.plot.param.tf(df = df.t,
param.sel = p,names.param = names.param, p = p,names.param = names.param,
xlab = expression(paste(Delta, ' Maximum height (m)')), xlab = expression(paste(Delta, ' Maximum height (m)')),
ylim = range(filter(df.t, ylim = range(filter(df.t,
param.type == 'GiGj')%>% select(upr,lwr)), param.type == 'GiGj')%>% select(upr,lwr)),
...@@ -2018,7 +2018,7 @@ if(p == 'GiGj'){ ...@@ -2018,7 +2018,7 @@ if(p == 'GiGj'){
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)
}else{ }else{
fun.plot.param.tf(df = df.t, fun.plot.param.tf(df = df.t,
param.sel = p,names.param = names.param, p = p,names.param = names.param,
xlab = NA, xlab = NA,
xaxt= 'n', xaxt= 'n',
ylim = range(filter(df.t, ylim = range(filter(df.t,
...@@ -2068,7 +2068,7 @@ layout(m, heights=hei, widths= wid ) ...@@ -2068,7 +2068,7 @@ layout(m, heights=hei, widths= wid )
names(expr.p.vec) <- c('rho', 'kikj', 'GiGj') names(expr.p.vec) <- c('rho', 'kikj', 'GiGj')
names.param <- c("rho","kikj", 'GiGj') names.param <- c("rho","kikj", 'GiGj')
names(names.param) <- c('rho', 'kikj', 'GiGj') names(names.param) <- c('rho', 'kikj', 'GiGj')
col.vec <- c('green', 'red', 'blue') col.vec <- c('#018571', '#a6611a', '#dfc27d')
names(col.vec) <- c("rho","kikj", 'GiGj') names(col.vec) <- c("rho","kikj", 'GiGj')
for (t in c('Wood density', 'Specific leaf area', 'Maximum height')){ for (t in c('Wood density', 'Specific leaf area', 'Maximum height')){
for (p in c('rho')){ for (p in c('rho')){
......
This diff is collapsed.
This diff is collapsed.
...@@ -97,42 +97,60 @@ pandoc.table(cor.mat, ...@@ -97,42 +97,60 @@ pandoc.table(cor.mat,
## # Model results ## # Model results
## ![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) ## ![Variation of the four parameters linking wood density, specific leaf area and maximum height 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)
## ![**TODO**. BLABLA.](../../figs/rho_set_TP_intra.pdf) ## ![**Stabilising effect of competition between pairs of species in function of their traits distance, predicted according to the basal area growth models fitted for wood density, specific leaf area and maximum height.** $1 -\rho$ measure the relative strengh of intra-specific competition compared to inter-specific competition (where $\rho$ is defined as $\sqrt{\frac{\alpha{ij} \alpha{ji}}{\alpha{jj} \alpha{ii}}}$), where $\rho$ is a measure of niche overlap between a pair of species. If inter-specific competition is equal or greater than inter-specific competition $1- \rho \leqslant 0$, and there is no stabilising processes. If inter-specific competition is smaller than inter-specific competition $1- \rho > 0$, and this indicates the occurence of stabilising processes resulting in stronger intra- than inter-specific competition. As the niche overlap $\rho$ is estimated only with competition effect on individual tree basal area growth, this can not be taken as a direct indication of coexistence as with population growth model.](../../figs/rho_set_TP_intra.pdf)
##+ ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE ##+ ComputeTable_Effectsize, echo = FALSE, results = 'hide', message=FALSE
list.all.results <- list.all.results.0 <-
readRDS.root('output/list.lmer.out.all.NA.simple.set.rds') readRDS.root('output/list.lmer.out.all.NA.simple.set.rds')
list.all.results.intra <- list.all.results <-
readRDS('output/list.lmer.out.all.NA.intra.set.rds') readRDS.root('output/list.lmer.out.all.NA.intra.set.rds')
#TODO UPDATE FOR INTRA #TODO UPDATE NULL MODEL FOR INTRA
mat.param <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'), mat.param <- do.call('cbind',
extract.param, list.res = list.all.results, lapply(c('Wood.density', 'SLA', 'Max.height'),
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species', extract.param, list.res = list.all.results,
param.vec = c("(Intercept)", "logD", "Tf","sumBn", model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.intra.r.set.species',
"sumTnBn","sumTfBn", "sumTnTfBn.abs"))) param.vec = c("(Intercept)", "logD", "Tf",
mat.param.sd <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'), "sumBn.intra","sumBn.inter",
extract.param.sd, list.res = list.all.results, "sumTnBn","sumTfBn", "sumTnTfBn.abs"),
model = 'lmer.LOGLIN.ER.AD.Tf.MAP.MAT.r.set.species', data.type = 'intra'))
param.vec = c("(Intercept)", "logD", "Tf","sumBn",
"sumTnBn","sumTfBn", "sumTnTfBn.abs"))) mat.param[!row.names(mat.param) %in% c("(Intercept)", "logD", "Tf", "sumTfBn"),] <-
mat.R2c <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'), -mat.param[!row.names(mat.param) %in% c("(Intercept)", "logD", "Tf", "sumTfBn"),]
extract.R2c, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species')) mat.param.sd <- do.call('cbind',
mat.R2m <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'), lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.R2m, list.res = list.all.results, extract.param.sd, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species')) model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.intra.r.set.species',
mat.AIC <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'), param.vec = c("(Intercept)", "logD", "Tf",
extract.AIC, list.res = list.all.results, "sumBn.intra","sumBn.inter",
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.r.set.species')) "sumTnBn","sumTfBn", "sumTnTfBn.abs"),
mat.AIC.0 <- do.call('cbind', lapply(c('Wood.density', 'SLA', 'Max.height'), data.type = 'intra'))
extract.AIC, list.res = list.all.results,
model = 'lmer.LOGLIN.r.set.species')) mat.R2c <- do.call('cbind',
lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.R2c, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.intra.r.set.species',
data.type = 'intra'))
mat.R2m <- do.call('cbind',
lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.R2m, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.intra.r.set.species',
data.type = 'intra'))
mat.AIC <- do.call('cbind',
lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.AIC, list.res = list.all.results,
model = 'lmer.LOGLIN.ER.AD.Tf.MAT.MAP.intra.r.set.species',
data.type = 'intra'))
mat.AIC.0 <- do.call('cbind',
lapply(c('Wood.density', 'SLA', 'Max.height'),
extract.AIC, list.res = list.all.results.0,
model = 'lmer.LOGLIN.r.set.species'))
bold.index <- which(((mat.param - 1.96*mat.param.sd) >0 & mat.param > 0) | 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), ((mat.param + 1.96*mat.param.sd) <0 & mat.param <0),
...@@ -147,12 +165,14 @@ mat.param <- rbind(mat.param.mean.sd, ...@@ -147,12 +165,14 @@ mat.param <- rbind(mat.param.mean.sd,
round(mat.AIC- mat.AIC, 0), round(mat.AIC- mat.AIC, 0),
round(mat.AIC.0 - mat.AIC, 0)) round(mat.AIC.0 - mat.AIC, 0))
colnames(mat.param) <- c('Wood density', 'SLA', 'Maximum height') colnames(mat.param) <- c('Wood density', 'SLA', 'Maximum height')
row.names(mat.param) <- c('$m_0$', '$\\gamma$', '$m_1$', '$\\alpha_0$', row.names(mat.param) <- c('$m_0$', '$\\gamma$', '$m_1$',
'$\\alpha_{0 \\, intra}$','$\\alpha_{0 \\, inter}$',
'$\\alpha_e$', '$\\alpha_t$', '$\\alpha_e$', '$\\alpha_t$',
'$\\alpha_s$', '$R^2_m$*', '$R^2_c$*', '$\\Delta$ AIC', '$\\Delta$ AIC no trait') '$\\alpha_s$', '$R^2_m$*', '$R^2_c$*',
'$\\Delta$ AIC', '$\\Delta$ AIC no trait')
##+ Table2_Effectsize, echo = FALSE, results='asis', message=FALSE ##+ Table2_Effectsize, 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, $R^2$* of models and $\\Delta$ AIC of the model and of a model with no trait effect. Best model have a $\\Delta$ AIC of zero. See section Method for explanation of parameters", pandoc.table(mat.param[c(1,3,2,4:12), ], caption = "Standardized parameters estimates and standard error (in bracket) estimated for each trait, $R^2$* of models and $\\Delta$ AIC of the model and of a model with no trait effect. Best model have a $\\Delta$ AIC of zero. See section Method for explanation of parameters",
digits = 3, justify = c('left', rep('right', 3)), digits = 3, justify = c('left', rep('right', 3)),
emphasize.strong.cells = bold.index, split.tables = 200) emphasize.strong.cells = bold.index, split.tables = 200)
...@@ -164,39 +184,3 @@ pandoc.table(mat.param[c(1,3,2,4:11), ], caption = "Standardized parameters esti ...@@ -164,39 +184,3 @@ 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)
...@@ -124,7 +124,7 @@ maximum growth was include as: ...@@ -124,7 +124,7 @@ maximum growth was include as:
\begin{equation} \label{Gmax} \begin{equation} \label{Gmax}
\log{G_{\textrm{max} \, f,p,s}} = m_{0} + m_1 \, t_f + m_2 \, MAT + \log{G_{\textrm{max} \, f,p,s}} = m_{0} + m_1 \, t_f + m_2 \, MAT +
m_2 \, MAP + \varepsilon_{G_{\textrm{max}}, f} + \varepsilon_{G_{\textrm{max}}, p} + \varepsilon_{G_{\textrm{max}}, s}. m_3 \, MAP + \varepsilon_{G_{\textrm{max}}, f} + \varepsilon_{G_{\textrm{max}}, p} + \varepsilon_{G_{\textrm{max}}, s}.
\end{equation} \end{equation}
Here \(m_0\) is the average maximum growth, \(m_1\) gives the effect of Here \(m_0\) is the average maximum growth, \(m_1\) gives the effect of
...@@ -143,14 +143,14 @@ Previous studies have proposed different decomposition of the competition parame ...@@ -143,14 +143,14 @@ Previous studies have proposed different decomposition of the competition parame
\alpha_0 + \alpha_h ( t_f-t_c )$. Finally, Lasky et al.\citep{Lasky-2014} developped one single model inculding multiple-processes as $\alpha = \alpha_0 + \alpha_h ( t_f-t_c )$. Finally, Lasky et al.\citep{Lasky-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 \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 \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$).}, here we extended the approach of the most recent study\citep{Lasky-2014}. As presented in Fig. 1, competitive $\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$), and splitting $\alpha_0$ in intra- and inter-specific competition.}, here we extended the approach of the most recent study\citep{Lasky-2014}. As presented in Fig. 1, competitive
interactions were modelled using an equation of the form\footnote{For interactions were modelled using an equation of the form\footnote{For
fitting the model the equation of \(\alpha_{c,f}\) was developped with fitting the model the equation of \(\alpha_{c,f}\) was developped with
species basal area in term of community weighted mean of the trait, species basal area in term of community weighted mean of the trait,
see Supplementary methods for more details.}: see Supplementary methods for more details.}:
\begin{equation} \label{alpha} \begin{equation} \label{alpha}
\alpha_{c,f}= \alpha_{0,f} - \alpha_t \, t_f + \alpha_e \, t_c + \alpha_s \, \vert t_c-t_f \vert \alpha_{c,f}= \alpha_{0,f,intra} \, CON + \alpha_{0,f,inter} \, (1-CON) - \alpha_t \, t_f + \alpha_e \, t_c + \alpha_s \, \vert t_c-t_f \vert
\end{equation} \end{equation}
where: where:
...@@ -158,13 +158,13 @@ where: ...@@ -158,13 +158,13 @@ where:
\begin{itemize} \begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt \itemsep1pt\parskip0pt\parsep0pt
\item \item
\(\alpha_{0,f}\) is the trait independent competition for the focal $\alpha_{0,f,intra}$ and $\alpha_{0,f,inter}$ are respectively intra- and interspecific trait independent competition for the focal
species \(f\), modelled with a normally distributed random effect of species \(f\), modelled with a normally distributed random effect of
species \(f\) and a normally distributed random effect of data set species \(f\) and each with normally distributed random effect of data set
\(s\) {[}as \(s\) {[}as
\(\alpha_{0,f} = \alpha_0 + \varepsilon_{\alpha_0, f}+ \varepsilon_{\alpha_0, s}\), \(\alpha_{0,f} = \alpha_0 + \varepsilon_{\alpha_0, f}+ \varepsilon_{\alpha_0, s}\),
where \(\varepsilon_{\alpha_0, f} \sim \mathcal{N} (0,\sigma_{\alpha_0, f})\) and where \(\varepsilon_{\alpha_0, f} \sim \mathcal{N} (0,\sigma_{\alpha_0, f})\) and
\(\varepsilon_{\alpha_0, s} \sim \mathcal{N} (0,\sigma_{\alpha_0, s})\){]}, \(\varepsilon_{\alpha_0, s} \sim \mathcal{N} (0,\sigma_{\alpha_0, s})\){]}. And $CON$ is a binary variable taking the value one for $f=c$ (conspecific) and zero for $f \neq c$ (heterospecific),
\item \item
\(\alpha_t\) is the \textbf{tolerance of competition} of the focal \(\alpha_t\) is the \textbf{tolerance of competition} of the focal
species, i.e.~change in competition tolerance due to traits \(t_f\) of species, i.e.~change in competition tolerance due to traits \(t_f\) of
...@@ -184,30 +184,14 @@ where: ...@@ -184,30 +184,14 @@ where:
{[}$\varepsilon_{\alpha_s,s} \sim \mathcal{N} (0,\sigma_{\alpha_s})${]}. {[}$\varepsilon_{\alpha_s,s} \sim \mathcal{N} (0,\sigma_{\alpha_s})${]}.
\end{itemize} \end{itemize}
To explore whether the trait similarity effect $\alpha_s$ was driven Estimating different $\alpha_0$ for intra- and interspecific competition allow to account for trait independant differences in interactions with conspecific or with heterospecific.
only by different competitive effect between conspecific and
heterospecific, we also explored an alternative model where the traits
similarity was computed only for heterospecific and distinct trait
independent parameter $alpha_0$ were estimated for intraspecific and
interspecific competition. Intra-specific competition was modelled as:
\begin{equation}
\alpha_{f,f} = \alpha_{0,intra,f} + \alpha_t \, t_f + \alpha_e \, t_f
\end{equation}
where \(\alpha_{0,intra,f}\) is the intraspecific trait independent We also explored a simpler version of the model where only one $\alpha_0$ was include in the model of $\alpha_{c,f}$ as most previous studies have generally not make this distinction which may lead into an overestimation of the trait similarity effect. In this alternative model the equation was:
competition for the focal species \(f\) (with the same random
structure as above), and the other parameters have the same definition as in the previous model.