CamFreshwater / synchSalmon

0 stars 0 forks source link

SR Model Priors #15

Closed CamFreshwater closed 5 years ago

CamFreshwater commented 5 years ago

@ann-marieH I've pasted the single stock Ricker model formatted for JAGS that gives equivalent estimates to the winBUGS script you sent me a few months ago.

model{

  for(i in 1:nCUs){
    alpha[i] ~ dnorm(0, 0.001) 
    #smax[i] ~ dunif(0, upp[i])  #put prior on smax instead of beta for simplicity
    capUpp[i] <- 3*upp[i] #add cap for prior
    logUpp[i] <- log(upp[i])
    smax[i] ~ dlnorm(logUpp[i], 1)I(,capUpp[i]) #prior based on FRSSI documentation
    beta[i] <- 1/smax[i]

    tau_R[i] ~ dgamma(0.001, 0.001)
    sig_R[i] <- 1 / sqrt(tau_R[i])

    for(j in 1:nyears[i]){
      lnRSmat[i,j] ~ dnorm(pred[i,j], tau_R[i])  #likelihood function
      pred[i,j] <- alpha[i] - beta[i] * Smat[i,j]  #prediction of log(R/S)
    }  #end for j in nyears
  }  #end for i in nCUs

}

As you can see it contains two options for priors on Smax and FRSSI appears to use the log-normal version. Is it correct to interpret that distribution as lognormal with a mean of logUpp and variance = 1, truncated at capUpp? FWIW upp = maximum observed spawner abundance. Thanks!

ann-marieH commented 5 years ago

Yes, that's it exactly. We ended up implementing the 3x lgst SPN as an upper value for Smax, because if we didn't, there were a couple of stocks where the implied capacity was crazy high (e.g. EStu & Cultus - oop, we meant to go back and check these out a bit more!) [Pestal et al. 2011] ... and I think those may have taken a really large sample size before they converged (but that's not documented & only based on a vague memory from way back)

CamFreshwater commented 5 years ago

Great, thanks!