A tutorial accompanying the publication:
B. Rosenbaum, E.A. Fronhofer. 2023. Confronting population models with experimental microcosm data: from trajectory matching to state-space models. Ecosphere 14(4): e4503. https://doi.org/10.1002/ecs2.4503
For questions, contact benjamin.rosenbaum@idiv.de
Raw R-code is now available in a seperate folder.
I updated deprecated Stan code, concerning arrays and the ODE-solver function.
While I wrote R code using the popular RStan package, I strongly recommend using the CmdStanR package instead. This increases performance and I observed model fitting is three times faster. While the Stan model code is identical, R functions for compiling, fitting and analyzing the model are slightly different. An example is now given below.
Logistic growth - State-space model
Consumer resource - PROC model