Open infotroph opened 8 years ago
The above wall of text isn't very clear about which parts I'm soliciting help with and which are for me to fix. Looking for feedback on the existing versions of sim_mixdist.R and test_mix_tube_depth.R, anything else is gravy.
sim_mixdist.R
seems straightforward and clear. Two suggestions:
stopifnot
, assertthat::assert_is
, etc.) types and sizes of incoming parameters.I like the way you end test_mix_tube_depth.R
with a sessionInfo()
call - this is good documentation, particularly if the script's output is mirrored to a log file*. Consider also documenting, in the code, which version of rstan
you're currently using.
* Shameless self-promotion: check out luzlogr.
Your mission
All of the scripts in the
stan/
directory are fitting hierarchical Bayesian models to a ~15000-image minirhizotron dataset collected from four different bioenergy cropping systems. To test them, I want to run each model on synthetic data generated from known parameter values.If you can help with this, please start by commenting on sim_mixdist.r and text_mix_tube_depth.r. All feedback from math corrections to nitpicky style suggestions are welcome, but especially:
Background
The main quantity of interest is total standing root mass (eventually through time, but time is not yet implemented). There are 96 minirhizotron tubes in total (24 per crop), sampled ~monthly during the growing season from 2010 through 2014. The experiment is laid out in 4 blocks, but I assume here that variance between tubes overwhelms any block effect.
Needed for an effective simulation
log(y) ~ a + b*log(depth) + e
, e~N(0,sigma).p(y>0) ~ logistic(aa+bb*mu)
,p(y|y>0) ~ logN(mu, sigma)
. Credit to Sonderegger et al 2013 for this model formulation.