-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I've been trying to create basic CJS models, before adding more complex covariates from my dataset. I've been using the following link as guidance:
https://jamesepaterson.github.io/jamespatersonblog/2020-04-26_introduction_to_CJS.html
instead of comparing sexes, I am looking at differences between locations.
When I've tried cjs.m2 on my own dataset, I keep receiving this error that does not allow me to continue:
Error in intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) :
index larger than maximal 42
How do I address this issue so I can continue analyzing my data. My code is below.
cjs.m1 <- crm(fish)
cjs.m1 <- cjs.hessian(cjs.m1)
cjs.m1
exp(cjs.m1$results$beta$Phi)/(1+exp(cjs.m1$results$beta$Phi))
predict(cjs.m1,
newdata = data.frame(location =c("River1", "River2")),
se = TRUE)
cjs.m1.unequaltime <- crm(fish,
time.intervals = c(1.7, 2.9, 2.5, 6.5, 3.99, 3.4))
predict(cjs.m1.unequaltime)
fish.proc <- process.data(fish,
group = "location")
fish.ddl <- make.design.data(fish.proc)
Phi.dot <- list(formula = ~1) # ~1 is always a constant (or single estimate)
Phi.location <-list (formula = ~location)
p.location <-list(formula = ~location)
cjs.m2 <- crm(fish.proc,
fish.ddl,
model.parameters = list(Phi = Phi.dot,
p = p.location),
accumulate = FALSE)