Model run

## sw-ue4kq10bsypiw0v8e8ko 
## intrinsic growth rate, all data, no woodymono, no correlation 
## Random Inits: TRUE 
## Inits object: randomInits 
## Total minutes: 1620.9 
## Total iterations: 325000 
## n_chain: 6 
## n_adapt: 5000 
## n_burn: 20000 
## n_draw: 50000 
## n_thin: 50 
## Total samples kept: 6000 
## Extended burnin: FALSE 
## convergence: TRUE 
## ppc: 0.501
## db_hash: compadre 4.0.2 + unpublished trait data

JAGS code

model {

# priors
mu_alpha ~ dnorm(0, 0.001)
mu_beta ~ dnorm(0, 0.001)

sigma_alpha ~ dunif(.01,  upper_alpha)
sigma_beta ~ dunif(.01,  upper_beta)
sigma_spp ~ dunif(.01, upper_spp)
sigma_pop ~ dunif(.01, upper_pop)

tau_alpha <- pow(sigma_alpha, -2)
tau_beta <- pow(sigma_beta, -2)
tau_spp <- pow(sigma_spp, -2)
tau_pop <- pow(sigma_pop, -2)

lambda ~ dunif(0, 1)

for (k in 1:nlfs){
  alpha[k] ~ dnorm(mu_alpha, tau_alpha)
  beta[k] ~ dnorm(mu_beta, tau_beta)
}

# likelihood
# species model
z_species[1:nspp] ~ dmnorm(mu[], tau_phy[,])
    
for(j in 1:nspp) {
  mu[j] <- alpha[lifeform[j]] + beta[lifeform[j]] * height[j]
}
    
# population model 
for (i in 1:length(y)) {
  y[i] ~ dnorm(z_species[species[i]], tau_pop)
  rnew[i] ~ dnorm(z_species[species[i]], tau_pop)
  rsqActual[i] <- pow(y[i] - z_species[species[i]], 2)
  rsqNew[i] <- pow(rnew[i] - z_species[species[i]], 2)
}   
    
# phylogenetic var-cov matrix
Mlam <- lambda * Amat + (1 - lambda) * ID
tau_phy <- tau_spp * inverse(Mlam)

# derived quantities
for (j in 1:nspp) {
  z[j] <- ifelse(survival == 0, z_species[j], exp(z_species[j]) / (1 + exp(z_species[j]))) 
}
    
#  posterior predictive check
zActual <- sum(rsqActual[])   
zNew <- sum(rsqNew[]) 
test <- step(zNew - zActual)    
bpvalue <- mean(test)   

}

PVR JAGS code

model {

# priors
mu_alpha ~ dnorm(0.0444, 1/0.0403^2)
mu_beta ~ dnorm(-0.0158, 1/0.0401^2)

sigma_alpha ~ dgamma(0.0436^2/0.0322^2,  0.0436/0.0322^2)
sigma_beta ~ dgamma(0.0505^2/0.0526^2, 0.0505/0.0526^2)
sigma_spp ~ dgamma(0.1760^2/0.0121^2, 0.1760/0.0121^2)
sigma_pop ~ dgamma(0.2633^2/0.0034^2, 0.2633/0.0034^2)

tau_alpha <- pow(sigma_alpha, -2)
tau_beta <- pow(sigma_beta, -2)
tau_spp <- pow(sigma_spp, -2)
tau_pop <- pow(sigma_pop, -2)

for (k in 1:nP){
  vgamma[k] ~ dnorm(0, 0.001)
}

for (k in 1:nlfs){
  alpha[k] ~ dnorm(mu_alpha, tau_alpha)
  eps.alpha[k] <- alpha[k] - mu_alpha
  beta[k] ~ dnorm(0, tau_beta)
}

# likelihood
# species model
for(j in 1:nspp) {
  z_species[j] ~ dnorm(mu[j], tau_spp)
  mu[j] <- alpha[lifeform[j]] + mu_beta * height[j] + beta[lifeform[j]] * height[j] + phylo[j]
  eps.spp[j] <- z_species[j] - mu[j]
}

phylo <- P %*% vgamma[]

# population model 
for (i in 1:length(y)) {
  y[i] ~ dnorm(z_species[species[i]], tau_pop)
  rnew[i] ~ dnorm(z_species[species[i]], tau_pop)
  rsqActual[i] <- pow(y[i] - z_species[species[i]], 2)
  rsqNew[i] <- pow(rnew[i] - z_species[species[i]], 2)
  eps.pop[i] <- y[i] - z_species[species[i]]
}   
    
# derived quantities
sd.lf <- sd(eps.alpha[])
sd.h <- abs(mu_beta)
sd.lfh <- sd(beta[])
sd.spp <- sd(eps.spp[])  
sd.pop <- sd(eps.pop[])  

for (i in 1:nP){
  sd.P[i] <- abs(vgamma[i]) * sd(P[,i])
}

#  posterior predictive check
zActual <- sum(rsqActual[])   
zNew <- sum(rsqNew[]) 
test <- step(zNew - zActual)    
bpvalue <- mean(test)   

}

Convergence/Identifiablity

mean sd 2.5% 50% 97.5% Rhat n.eff
alpha[1] 0.0489 0.0527 -0.0514 0.0466 0.1592 1 5762
alpha[2] 0.0634 0.0534 -0.0348 0.0588 0.1812 1 6077
alpha[3] 0.0299 0.0454 -0.0625 0.0311 0.1203 1 5882
alpha[4] 0.0208 0.0388 -0.0604 0.0217 0.0970 1 6277
alpha[5] 0.0616 0.0624 -0.0442 0.0550 0.2058 1 6132
alpha[6] 0.0329 0.0370 -0.0414 0.0330 0.1066 1 5863
alpha[7] 0.0559 0.0387 -0.0227 0.0559 0.1315 1 5989
beta[1] -0.0012 0.0214 -0.0432 -0.0011 0.0420 1 6116
beta[2] -0.0364 0.0737 -0.2386 -0.0218 0.0650 1 5321
beta[3] -0.0069 0.0570 -0.1255 -0.0073 0.1162 1 5977
beta[4] -0.0058 0.0443 -0.1006 -0.0055 0.0875 1 6000
beta[5] -0.0339 0.0839 -0.2639 -0.0187 0.0794 1 5468
beta[6] -0.0070 0.0340 -0.0762 -0.0070 0.0619 1 6000
beta[7] -0.0157 0.0199 -0.0553 -0.0151 0.0221 1 5960
mu_alpha 0.0444 0.0403 -0.0349 0.0439 0.1268 1 5855
mu_beta -0.0158 0.0401 -0.1052 -0.0119 0.0458 1 6265
sigma_alpha 0.0436 0.0322 0.0112 0.0343 0.1274 1 5645
sigma_beta 0.0505 0.0526 0.0109 0.0338 0.1940 1 4517
sigma_spp 0.1760 0.0121 0.1537 0.1755 0.2017 1 6337
sigma_pop 0.2633 0.0034 0.2568 0.2633 0.2702 1 6234
lambda 0.0736 0.0670 0.0020 0.0550 0.2459 1 5522

Of the 425 species modeled, the latent response variables converged for 100% of them.


Fig. S5-1: Trace plots of key model parameters.

Fit

Fig. S5-2: Scatterplot of summed squared residuals between observed and predicted intrinsic growth rate and between simulated and predicted intrinsic growth rate at each MCMC iteration for each population. The Bayesian posterior predictive check p-value was 0.50.

Species response

Fig. S5-3: Intrinsic growth rates (\(z_{j}\), Eqn. 1) for all modeled species, ordered by magnitude. Thick lines represent the 50% equal-tailed credible intervals, thin lines represent the 95% equal-tailed credible intervals, and circles are the posterior medians.

Height parameters

Fig. S5-4: Parameter estimates for \(\alpha_{m}\) (Eqn. 1) showing intrinsic growth rate at average plant height (8 m). Thick lines represent the 50% equal-tailed credible intervals, thin lines represent the 95% equal-tailed credible intervals, and circles are the posterior medians.


Fig. S5-5: Parameter estimates for \(\beta_{m}\) (Eqn. 1) showing effects of a 1 SD change in plant height (15.6 m) on intrinsic growth rate by lifeform. Thick lines represent the 50% equal-tailed credible intervals, thin lines represent the 95% equal-tailed credible intervals, and circles are the posterior medians. Gray estimates with closed circles represent 50% credible intervals that do not overlap zero, and gray estimates with open circles represent 50% credible intervals that overlap zero.

Growth rate vs. height

Fig. S5-6: Intrinsic growth rates as a function of maximum plant height (in meters) by lifeform. The gray shaded areas represent the 95% equal-tailed credible intervals and the red lines are the posterior medians for the fitted relationship. Filled circles are the medians and black vertical bars are the 95% equal-tailed credible intervals for the intrinsic growth rate of each species (\(z_{j}\)).

ANOVA

Fig. S5-7: Results from the Bayesian analysis of variance showing the finite-population standard deviation for each source of variation (lifeform, plant height, interaction between lifeform and plant height, the five most important phylogeny vectors, unexplained variation among species, unexplained variation among populations) for intrinsic growth rate. For simplicity we show only the five phylogeny vectors with the largest finite standard deviation values, as all other phylogeny vectors had minimal variance components. Larger values indicate a higher proportion of variation explained by the source. Filled circles represent the median, thick bars indicate the 50% credible interval, and thin bars indicate the 95% credible interval for each estimate.

Fitted vs. Predicted




Fig. S5-8: Predicted intrinsic growth rates based on biological traits and phylogenetic relatedness for five focal plant species (Abies concolor - 5 populations in dataset, Astragalus alopecurus - 16, Bothriochloa ischaemum - 6, Cecropia obtusifolia - 4, and Frasera speciosa - 25). “Fitted” values (gray bars) are the posterior distributions for the estimated intrinsic growth rate when data for all species were included in the model, whereas “predicted” values (black bars) are when data for the focal species were excluded. Open circles indicate the observed intrinsic growth rates from each population of the species. Filled circles indicate the median, thick bars indicate the 50% credible interval, and thin bars indicate the 95% credible interval for each estimate.