# JAGS model used to derive parameters shown in manuscript Figure 4 # February and Higgins, Rapid leaf deployment strategies in a deciduous savanna. # PloSONE insert doi # order refers to twig order # data is the sampling date # tree is the indentity of the individual tree sampled model { for (i in 1:N){ Nitrogen[i] ~ dnorm(N.mu[i],tau.N) N.mu[i] <- date[i]*slope[order[i]] + pow(date[i],2)*slope2[order[i]] + b.tree[tree[i]] + intercept[order[i]] } for (p in 1:Ntree) { b.tree[p] ~ dnorm(0, pow(0.01,-2)) } for(p in 1:4) { #4 orders slope[p] ~ dnorm(0, pow(0.05,-2)) slope2[p] ~ dnorm(0, pow(0.001,-2)) intercept[p] ~ dnorm(0, pow(0.05,-2)) } sig.N ~ dunif(0.0001,1) tau.N <- 1/(sig.N*sig.N) }