Supplement 1. R code and example data set for fitting the Bayesian model of tree growth.
2016-08-09T13:19:10Z (GMT) by
<h2>File List</h2><p> <a href="diametergrow.R">diametergrow.R</a> (md5: b1008ce912f0b0a15a9464b23095c6e7)<br> <a href="diametergrow_functions.R">diametergrow_functions.R</a> (md5: 84fd1c6aaf3d96cf64802cfdb4153735)<br> <a href="diametergrow_evaluation.R">diametergrow_evaluation.R</a> (md5: b1f159cb1eba83540645f63b7a565823)<br> <a href="diametergrow_prediction.R">diametergrow_prediction.R</a> (md5: 628ba7956ec2440ee0184c8257adc8f4)<br> <a href="microphylla.RData">microphylla.RData</a> (md5: 24c613a8b8b12bf505345ef39a052214) </p><h2>Description</h2><div> <p><i>Disclaimer</i>: Code provided in this supplement was not developed for general distribution. It is included at the request of the editor. The funding for this project does not provide for software development of a user interface or for full documentation. The example is one of many working versions that are under continued development and being used in several projects. The basic approach builds on Clark et al. (2007), further described in Clark et al. (2010). The code generates objects that are used as inputs for purposes other than those described here. Unfortunately, we do not have resources to engage in active software support, but welcome feedback. </p> <p>The supplement contains R scripts for running the Bayesian state space model (diametergrow.r), functions used in the model (diametergrow_functions.r), calculating parameters and graphing used in evaluating model performance (diametergrow_evaluation.r), and predicting growth of trees of different sizes and light environments (diametergrow_prediction.r). An example data set is included for one of our species.</p> <p>Data used in the modeling are loaded as several objects. diameters, increment, and surviv are lists, with each matrix in the list containing data for a different plot. For the example data set each of these lists has length one. diametergrow.r can include a random plot effect if the list is longer than length one. If stems are organized by species instead of plots, a random species effect can be included instead of a random plot effect. In each of these lists and covars, each row of data is a separate stem, and the order of rows is the same in each. Different covariates may be included in the model; they can be factors. Below are the first few rows of data for one of the species analyzed as an example.</p> <p>Data structure of objects included in .Rdata file loaded into diametergrow.r:</p> <div> <p>diameters - list of matrices containing diameter measurements in cm for each year surveyed:</p> -- TABLE: Please see in attached file. -- <p>increment - list of matrices with measured diameter increment in cm for each year:</p> -- TABLE: Please see in attached file. -- <p>surviv - list of matrices indicating whether a stem was alive in each year of the survey; 0 = dead, 1 = alive, NA = not surveyed:</p> -- TABLE: Please see in attached file. -- <p>covars - matrix of covariates, three were used in this analysis: elev (in km), dbh (in dm), and C.St2 (ordinal):</p> -- TABLE: Please see in attached file. -- <p>yrvec - list of years included in the analysis:</p> -- TABLE: Please see in attached file. -- <p>mtree - vector of number of stems included in dataset, one value for each plot when including a random plot effect:</p> <p>260</p> <p>plotnames - not used in this example, but a vector of names when there are multiple plots:</p> <p>"none"</p> <p>spgroup - name of species being analyzed, used to label model output:</p> <p>"microphylla"</p> </div> </div> <br>