commfish / seak_sablefish

NSEI sablefish stock assessment
8 stars 5 forks source link

Compute Chapman estimate in Bayesian framework #28

Open jysullivan opened 5 years ago

jysullivan commented 5 years ago

Compute Chapman estimate in Bayesian framework so it can be compared with other models using DIC.

Requested by @ben-williams

jysullivan commented 5 years ago

@ben-williams I definitely see the intention here but need a little help understanding what you want. If we put it in a Bayesian model, it is no longer a Chapman estimator. In general I don't know how to compute an information criterion for an estimator because there's no likelihood component.

jysullivan commented 5 years ago

Here's the jags code if we strip down Model 1 (remove catch and natural mortality), but this is not a Chapman estimator.

You'll notice the time periods are included here (P). There are just 2 though, one for the survey and one for the fishery.

mod0 <- "
model {
# Priors
N.1 ~ dnorm(mu.N,1.0E-12) #I(0,)    # number of sablefish in Chatham at beginning of period 1

N[1] <- N.1
K[1] <- K.0 - D.0  # number of marks at beginning of period 1 (longline survey)
# K.0 = Number of tags released
# D = Number of tags lost to fishery or longline survey

for(i in 2:P) {
K[i] <- K[i-1] - k[i-1] - D[i-1] # Number of marks at beginning of period i
N[i] <- N[i-1] # Total number of sablefish at beginning of period i
}

for(i in 1:P) {

# Use a weakly informative beta prior on p. Note that x (K/N) doesn't change
# much through time b/c the population numbers are large, though we want to
# allow p to change through time due to changes in CPUE and mean size

x[i] <- K[i] / N[i]  # probability that a caught sablefish is clipped (x = nominal p)

# Generate a prior for p, informed by x. A large multiplier indicates our
# confidence in x

a[i] <- x[i] * 10000  # the alpha parameter in the beta distribution, used as a prior for p
b[i] <- (1 - x[i]) * 10000  # the beta paramter in the beta distribution
p[i] ~ dbeta(a[i], b[i]) # beta prior for p, the probability that a caught sablefish is clipped

k[i] ~ dbin(p[i], n[i])  # Number of clipped fish ~ binomial(p, n)
}

N[P+1] <- N[P] 

# Compute quantities of interest:
N.avg <- mean(N[])
}
"
jysullivan commented 5 years ago

Resource you sent me last year on the topic:

williams_feb2018_mr_bayes.pdf

ben-williams commented 5 years ago

We don't necessarily care about the Chapman estimator - a basic binomial probability in a bayes framework is for all intents and purposes the same thing. I would recommend using something like the attached doc or your stripped down code w/2 time periods so that it is in a comparable framework to the other models