Code to reproduce analysis from "Simultaneous optimal target season estimation and local climate reconstruction using tree-ring widths"
To get a sense of the modeling workflow, I recommend starting with /analysis/r_code/ppe_linear.R
- pre-processed time series used in the study are stored in
/data/, and the preprocessing scripts are available in/data_preprocessing
If you already have basic familiarity with stan, then /analysis/stan_code/baseline_model is a good place to start to get basic familiarity with the model. The "baseline model" takes annual-resolution climate data as input, rather than the proposed model, which takes monthly-resolution climate data as input. Working with annual-resolution data simplifies the code considerably.
If you're new to stan, the building_blocks folder contains extra material with minimal examples to help get you started. These examples also explain how our stan models expect the data to be formatted, which will be useful if you prefer to use stan with a programming language different to R.
Questions or comments can be directed to [email protected]