Joshua M. Rapp, Miles R. Silman, James S. Clark, Cecile A. J. Girardin, Darcy Galiano, and Richard Tito. Year. Intra- and inter-specific tree growth across a long altitudinal gradient in the Peruvian Andes. Ecology 93:2061–2072. http://dx.doi.org/10.1890/11-1725.1
Supplement
R code and example dataset for fitting the Bayesian model of tree growth.
Ecological Archives E093-197-S1.
Authors
File list (downloads)
Description
Joshua M. Rapp
Harvard Forest
Harvard University
324 N Main St.
Petersham, MA 01366
USA
Email: rapp.joshua@gmail.com
Miles R. Silman
Department of Biology
Wake Forest University
1834 Wake Forest Rd.
Winston-Salem, NC 27106
USA
James S. Clark
Department of Biology
Nicholas School of the Environment
Duke University
Durham, NC 27708
USA
Cecile A. J. Girardin
Environmental Change Institute
School of Geography and the Environment
Oxford University
South Parks Road
Oxford, OX1 3QY
United Kingdom
Darcy Galiano
Universidad Nacional de San Antonio Abad del Cusco
Av. de la Cultura, Nro. 733
Cusco
Perú
Richard Tito
Universidad Nacional de San Antonio Abad del Cusco
Av. de la Cultura, Nro. 733
Cusco
Perú
File list
diametergrow.R (md5: b1008ce912f0b0a15a9464b23095c6e7)
diametergrow_functions.R (md5: 84fd1c6aaf3d96cf64802cfdb4153735)
diametergrow_evaluation.R (md5: b1f159cb1eba83540645f63b7a565823)
diametergrow_prediction.R (md5: 628ba7956ec2440ee0184c8257adc8f4)
microphylla.RData (md5: 24c613a8b8b12bf505345ef39a052214)
Description
Disclaimer: 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.
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.
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.
Data structure of objects included in .Rdata file loaded into diametergrow.r:
diameters - list of matrices containing diameter measurements in cm for each year surveyed:
[[1]] | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 |
[1,] | 10.1 | NA | NA | NA | 10.2 | 10.2 | 10.0 |
[2,] | 19.6 | NA | NA | NA | 21.5 | 20.8 | 20.5 |
[3,] | 20.4 | NA | NA | NA | 20.2 | 20.4 | 20.4 |
[4,] | 15.8 | NA | NA | NA | 15.6 | 15.6 | 15.6 |
[5,] | NA | NA | NA | NA | NA | NA | 2.4 |
[6,] | 23.6 | NA | NA | NA | 24.8 | 25.1 | 25.5 |
increment - list of matrices with measured diameter increment in cm for each year:
[[1]] | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 |
[1,] | NA | 0.00890292 | 0.00890292 | 0.0002926987 | 0.0465189921 | 0.021790184 |
[2,] | NA | NA | NA | NA | NA | NA |
[3,] | NA | 0.02225730 | 0.02225730 | 0.0775413064 | 0.1328174614 | 0.145322506 |
[4,] | NA | NA | NA | NA | NA | NA |
[5,] | NA | NA | NA | NA | NA | NA |
[6,] | NA | NA | NA | NA | 0.2419306248 | 0.308854210 |
surviv - list of matrices indicating whether a stem was alive in each year of the survey; 0 = dead, 1 = alive, NA = not surveyed:
[[1]] | X2003 | X2004 | X2005 | X2006 | X2007 | X2008 | X2009 |
1068 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
1069 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
1070 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
1071 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
1072 | NA | NA | NA | NA | NA | NA | NA |
1074 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
covars - matrix of covariates, three were used in this analysis: elev (in km), dbh (in dm), and C.St2 (ordinal):
elev | dbh | H.md | C.St1 | C.St2 | |
1 | 3.2 | 1.00 | 8.00 | 4.0 | 3 |
2 | 3.2 | 1.96 | 12.00 | 4.5 | 3 |
3 | 3.2 | 2.01 | 16.00 | 4.0 | 3 |
4 | 3.2 | 1.56 | 12.00 | 3.0 | 2 |
5 | 3.2 | 0.24 | 3.5 | 2.0 | 1 |
6 | 3.2 | 2.36 | 16.00 | 3.0 | 2 |
yrvec - list of years included in the analysis:
[1] | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 |
mtree - vector of number of stems included in dataset, one value for each plot when including a random plot effect:
260
plotnames - not used in this example, but a vector of names when there are multiple plots:
"none"
spgroup - name of species being analyzed, used to label model output:
"microphylla"
Literature Cited
Clark, J. S., D. Bell, C. J. Chu, B. Courbaud, M. Dietze, M. Hersh, J. HilleRisLambers, I. Ibanez, S. LaDeau, S. McMahon, J. Metcalf, J. Mohan, E. Moran, L. Pangle, S. Pearson, C. Salk, Z. H. Shen, D. Valle, and P. Wyckoff. 2010. High-dimensional coexistence based on individual variation: a synthesis of evidence. Ecological Monographs 80:569–608.
Clark, J. S., M. Wolosin, M. Dietze, I. Ibanez, S. LaDeau, M. Welsh, and B. Kloeppel. 2007. Tree growth inference and prediction from diameter censuses and ring widths. Ecological Applications 17:1942–1953.
ESA Publications | Ecological Archives | Permissions | Citation | Contacts