StanCon2020_Neighbor_interaction_models

StanCon2020_Neighor_interaction_models

Spatial interactions between neighboring plants are foundational to population and community ecology. Neighbor interactions include both positive (facilitation) and negative (competition) effects. The strength of interaction between neighboring plants decays with distance and is often modeled using non-linear functions that take into account a target plant and all its neighbors, resulting in large matrices that represent pairwise interactions. The structural complexity of neighbor interactions and the large size of neighborhood data structures results in long run times and convergence problems. In this document, we demonstrate how Stan’s segment function can speed computation on sparse matrices of pairwise neighbors in plant-plant interaction models. In addition, we present solutions to common problems of fitting neighborhood models with hierarchical effects, including a comparison of centered vs. non-centered parameterizations. We conclude that the flexibility of the Stan programming language presents novel opportunities to fit classic spatial models in ecology.