DOI: 10.6084/m9.figshare.3567522
title: Supplement 1. WinBUGS code for the statistical model that estimates vital rates, effects of time since fire, year and population effects.

description: File List Supplement1Code.txt Description The code is commented throughout (following pound signs, ###). Here we make note of indexing and notation issues, peculiarities of the data, and BUGS conventions that may be confusing. Notation is consistent between the manuscript and BUGS code below, with two exceptions: (1) transition probabilities (ap,t,i,j) described in the manuscript are here denoted pi[p,t,i,j] and (2) the notation for random effects follows the parameterization described in Appendix A, Section 1.4, “Hierarchical Centering”. The seedling survival submodel, a logistic regression of the number of seedlings surviving from the time of detection (at a quarterly census) to the time of the annual census in September, is split into several loops because there were certain years and populations when either 1) no seedlings emerged or 2) fire killed seedlings. In the first case, it is impossible to run a logistic regression, because the denominator (<i>i.e.</i>, the number of seedlings that emerged) is zero. In the second case, we wish to exclude the direct effect of fire (100% mortality) on seedlings, in order to detect the subsequent effect of time-since-fire. Thus what would otherwise be a single loop: for (p in 1:P){ for (t in 2:20){ Nsdlg[p,t] ~ dbin(s[p,t], Ngerm[p,t]) logit(s[p,t]) } } takes up many lines of code in several loops. The five study populations are indexed 1:5 (corresponding to population codes 2, 4, 10, 12, and 19 listed in Table 2). In order to constrain the values taken on by the b2 parameters to +1 or -1, we use three lines of code. For example, b2.sd, the sign of the correlation between the effect of year variation on the number of seeds per branch and the model-wide year effect, is constrained as follows: b2.sd I.b2.sd ~ dbern(pi.b2.sd) pi.b2.sd ~ dunif(0,1) That is, a sample from a Bernoulli (coin flip) process is assigned to the intermediate parameter I.b2.sd. Thus I.b2.sd takes values 0 or 1, which is then transformed to values +1 or -1 by multiplying I.b2.sd by 2 and subtracting 1. The Bernoulli process has probability pi.b2.sd, which is assigned a uniform prior distribution (0,1). In BUGS, a normal distribution (such as the normal priors assigned for b0 and b1 terms, year effects, etc.) is defined in terms of mean and precision. Precision (denoted τ by convention) is the inverse of variance. To translate between precision and standard deviation (σ), we use the power function (pow in BUGS): tau.b0.sd That is, τ = σ-2 or τ = 1/σ2. Finally, note that in the multinomial regression submodel, we used an indicator variable (ind[p,t]) to force BUGS to ignore (1) missing data or (2) the year that a population burned. Censusing of population 19 did not begin until 1990 (see Table 1), thus the indicator excludes the first two years of (missing) data from this population. The year after fire (tsf=1) is another case of missing data: the only plants in the population are newly emerged seedlings. Only in the following year (tsf=2) do those seedlings begin to transition into classes described by the multinomial model. We excluded years that a population burned (tsf=0) because we wish to exclude the direct effect of fire (100% mortality), as above in the seedling survival regression.