pbs-assess / gfiscamutils

:hammer: Utilities for https://github.com/pbs-assess/gfiscam models, including loading, plotting, and table-making
0 stars 1 forks source link

Get Beverton-Holt stock-recruitment parameters (MCMCs) #3

Open grinnellm opened 4 years ago

grinnellm commented 4 years ago

I'm looking for the median posterior alpha and beta parameters for the Beverton-Holt stock-recruitment relationship. I found the MPDs in the file "iscam.rep", and in the corresponding model objects model$mpd$so and model$mpd$beta. But I can't find the MCMCs; seems like they aren't currently exported from iscam -- let me know if I am mistaken.

cgrandin commented 4 years ago

That’s probably what it is. You can do that if you want to:

https://github.com/pbs-assess/gfiscam/blob/master/src/main/iscam.tpl

grinnellm commented 4 years ago

Temporary fix (thanks to Sam) for this is to get median posteriors for h, s0, and sb0 from model$mcmccalcs$p.quants and then calculate the BH parameters: alpha <- 4.*h*R0/(B0*(1.-h)) beta <- (5.*h-1.)/(B0*(1.-h)) I still think it would be useful to export the MCMCs though.

cgrandin commented 4 years ago

Search above code for: FUNCTION mcmc_output

Then add a column to the ofs output object. You have to find the parameter names in the code by searching