Pacific-salmon-assess / MetricsCOSEWIC

R Package for calculating COSEWIC metrics. Initial focus is on Probability of Decline.
GNU General Public License v3.0
0 stars 2 forks source link

Inverse Gamma priors on variance: Choice of scale/rate parameter #69

Open carrieholt opened 2 years ago

carrieholt commented 2 years ago

The initial choice of scale and rate parameters for inverse gamma distribution for priors on residual variance was 0.0001. https://github.com/SOLV-Code/MetricsCOSEWIC/blob/31563de949b725af2f7c615dfe4442d9c214796f/R/Module_Trend_JAGS.R#L23

However, this choice of priors is associated with a large probability density at very low sigma values (<0.1). See figure in this Rmd file: https://github.com/carrieholt/MetricsCOSEWIC-Stan/tree/main/Rmd

I think a more reasonable choice of scale and rate parameter is 0.1 where the bulk of the distribution of residual sigma is between 0.1 and 1.5. I have used this for stan in the comparison in outputs among methods: MLE, Jags, rstanarm and stan, this repo: https://github.com/carrieholt/MetricsCOSEWIC-Stan lines are here, in runStan.r file: https://github.com/carrieholt/MetricsCOSEWIC-Stan/blob/8525ab13eedad6eab47236ff7d3fb78a374d5af9/runStan.r#L88

In the end, I don't think the decline estimates are sensitive to it, but 0.0001 does seem extreme.