Closed s-cunningham closed 2 years ago
There's only 2 years though after dropping 2012-2013 Greenland geese...is that enough for a random effect?
I would make the following edits:
## Priors
for (i in 1:2) {
beta0[i] ~ dnorm(mu_beta0, tau.alpha)
}
mu_beta0 ~ dnorm(0,1/10)
tau.alpha ~ dgamma(0.01, 0.01)
I'd only put mean 0 if we model the grand mean separately (then it's random effect as a difference from the mean). Also, dunif(0,1) is a bad prior for a standard deviation... It forces the variance to be no bigger than 1. I see quite a bit of code floating around using a dunif prior on the standard deviation (dunif(0,3) and dunif(0,5)), but I'm not sure where that is coming from... We could look into other priors, but this is what I default to
Also, it doesn't matter that there is only two years for the estimation. Whether or not it's necessary depends on the signal in the data
Sounds good, thanks!
I have a random year effect in the stochastic antecedent models, but not sure if I have it set up correctly.
For example, ODBA model has:
## Priors
for (i in 1:2) {
beta0[i] ~ dnorm(0, tau.alpha)
}
tau.alpha <- 1/(sd.alpha*sd.alpha)
sd.alpha ~ dunif(0,1)
And:## Likelihood
for (i in 1:nind) {
defer[i] ~ dbern(p[i])
logit(p[i]) <- beta0[year[i]] + beta1*antPTF[i] + beta2*pop[i] + beta3*antPTF[i]*pop[i]
}
Model scripts: 11_StochasticAntecedentModels_ODBA.R 11_StochasticAntecedentModels_PTF.R