casruff / Skagit-River-Steelhead-Forecast

Reproducible analysis for generating annual abundance forecasts for Skagit River Steelhead
GNU General Public License v3.0
2 stars 2 forks source link

Redo Age Comp Prior to improve convergence speed #12

Open tbuehrens opened 3 years ago

tbuehrens commented 3 years ago

@casruff after inspecting more summaries, it is clear that the hierarchical dirichlet prior is causing converge issues, particularly for rare age classes. The good news is the effect on the overall model is miniscule because age 8 and age 3 fish (age classes 1 and 6) are really rare. An alternative parameterization could be in terms of the additive log odds ratio:

here, lorc = "log odds ratio component", orc = odds ratio component, and p = proportions by age class...softmax is a function that does the calcs more efficiently but doesn't exist in jags...this would be an easy improvement to implement...Eric, Mark, and I have all started using it independently because it tends to converge better than the dirichlet

for(a in 1:A){
    lorc[a]~normal(0,3)
    orc[a] = exp(lorc[a])
    p[a] = orc[a] /(sum(orc[a]))
}

#p[1:A] = softmax(lorc[1:A]) #if softmax existed in JAGS
tbuehrens commented 3 years ago

@casruff wondering it switching age comp to a multivariate logit normal random walk would be even better...could it be that time varying age comp of recruits accounts for some of the forecast misses recently?

tbuehrens commented 3 years ago

logit normal random walk is done...could update previous models to be logit normal random effects...likely would have negligible effects on estimates from original models but speed convergence