Albert Kim

and 2 more

1. Neighborhood competition models are powerful tools to measure the effect of interspecific competition. Statistical methods to ease the application of these models are currently lacking. 2. We present the forestecology package providing methods to i) specify neighborhood competition models, ii) evaluate the effect of competitor species identity using permutation tests, and iii) measure model performance using spatial cross-validation. Following Allen (2020), we implement a Bayesian linear regression neighborhood competition model. 3. We demonstrate the package’s functionality using data from the Smithsonian Conservation Biology Institute’s large forest dynamics plot, part of the ForestGEO global network of research sites. Given ForestGEO’s data collection protocols and data formatting standards, the package was designed with cross-site compatibility in mind. We highlight the importance of spatial cross-validation when interpreting model results. 4. The package features i) tidyverse-like structure whereby verb-named functions can be modularly “piped” in sequence, ii) functions with standardized inputs/outputs of simple features ‘sf‘ package class, and iii) an S3 object-oriented implementation of the Bayesian linear regression model. These three facts allow for clear articulation of all the steps in the sequence of analysis and easy wrangling and visualization of the geospatial data. Furthermore, while the package only has Bayesian linear regression implemented, the package was designed with extensibility to other methods in mind.