DOI: 10.5061/dryad.dz08kps7h
title: Data from: Cavities and the demographic performance of tropical rainforest trees

description: In tropical forests, trees often have damage in the form of visible
 cavities. However, the impacts of these cavities on tropical tree growth
 and survival are unknown, despite potential implications for the global
 carbon cycle. Here, we integrate 10 years of forest dynamics data with a
 survey of cavity presence on 25,450 rainforest trees (&gt; 5cm in
 diameter) in the 20 ha Xishuangbanna plot in southern China. We found that
 cavities negatively impacted tree growth, but not survival, with growth of
 smaller trees more negatively affected by cavities. Variation in the
 impact of cavities was not explained by functional traits related to
 species life history strategy (specific leaf area, wood density, seed
 mass, leaf %N, leaf %P). These results suggest that cavities may affect
 both the compositional and carbon dynamics of tropical forests, but
 further research is needed to determine what drives variation among tree
 species in cavity impact.
description: # Cavities and the demographic performance of tropical rainforest trees
 [https://doi.org/10.5061/dryad.dz08kps7h](https://doi.org/10.5061/dryad.dz08kps7h) ## Description of the data and file structure The data original field data from the Xishuangbanna forest plot contains diameter (DBH), presence of cavities, growth, survival, traits, and quadrat number.  Additional files from model output to produce a figure and for joining model parameter outputs with trait data are provided. R code used to generate the models and figures is provided. ### Files and variables #### File: forFig2.csv **Description:** Model output used for making figure 2. ##### Variables * param: the model parameter. The parameter names match the models shown in the manuscript. * mean: the mean of the posterior probability distribution for the parameter. * sd: the standard deviation of the posterior probability distribution for the parameter. * 2.50%: the 2.5% quantile of the posterior probability distribution for the parameter. * 97.50%: the 97.5% quantile of the posterior probability distribution for the parameter. #### File: all.rgr.cav.df\_2.csv **Description:** the data put into the RGR model (see RGR_rev4.R for code). NA values in the file indicate that the individual  ##### Variables * tag: tree tag number * spp: tree species identity as an integer * cavity: tree cavity presence (2) or absence (1) * dbh: diameter at breast height log transformed * rgr: diameter relative growth rate * quad: the 20x20m quadrat the tree is located in. #### File: rgr.names.rev4.csv **Description:** A vector of species names in the order for the RGR model. These names are joined with model output for trait correlations. ##### Variables * Species names from the plot using 6 letter codes. #### File: surv.names.rev4.csv **Description:**  A vector of species names in the order for the Survival model. These names are joined with model output for trait correlations. ##### Variables * Species names from the plot using 6 letter codes. #### File: all.surv.cav.df\_2.csv **Description:** the data put into the RGR model (see Surv_rev4.R for code) ##### Variables * tag: tree tag number * spp: tree species identity as an integer * cavity: tree cavity presence (2) or absence (1) * dbh: diameter at breast height log transformed * survive: did the tree survival (1) or not (0) * quad: the 20x20m quadrat the tree is located in #### File: xtbg.sp.trait.csv **Description:** The trait data used in this study to correlate with model posterior probability distributions. NA values indicate data for that trait for that species were not available. ##### Variables * sp: species codes in 6 letter format * thick: leaf thickness (mm) * sla: specific leaf area (cm^2/g) * densitymean: wood density (g/cm^3) * seedmass: seed mass (mg) * leaf.n: leaf %N * leaf.p: leaf %P ## Code/software The R statistical computing environment is needed to run the data using the associated Zenodo .R scripts. This study used R v4.4.1.  * RGR_rev4.r: the R script for running the growth models and writing out the output. Equation 1 in the manuscript. * Surv_rev4.r: the R script for running the growth models and writing out the output. Equation 2 in the manuscript. * correlations_r4.R: the R script for running correlations between trait data and draws from the posterior distributions of the model parameters. Functional Traits and Demographic Rate Model Parameters section of the Methods in the manuscript. This code uses the output from the models and the xtbg.sp.trait.csv file. * fig2.R: code for making Figure 2 in the manuscript. This code uses model output that is stored in the forFig2.csv file. * Fig.3_rev4.r: code for making Figure 3 in the manuscript, which are growth model parameter - trait correlations. This code is used with files output from the correlations_r4.R code. * Fig.4_rev4.r: code for making Figure 4 in the manuscript, which are survival model parameter - trait correlations. This code is used with files output from the correlations_r4.R code. * Fig.sup_rev4.r: code for making Figures S1-S4 in the manuscript, which are species level parameter posterior distributions. * rgr.ppc_figure.R: code for making the posterior predictive check figure in the manuscript (Figure S5). This uses output from the RGR_rev4.r code. * surv.ppc_figure.R: code for making the posterior predictive check figure in the manuscript (Figure S6). This uses output from the Surv_rev4.r code.