I am attempting to use CJS models in which a random effect is included that is not individual identity or time. In my case, the random effect is "release pool" (can be thought of similarly to site, where individuals are nested within release pools). I would like to model phi as a function of experimental treatment and this random effect, and would like to keep p constant.
My questions are:
1. Can I use RMark to implement this model by setting the model="CJSRandom" in the process.data function? I have read that this model type can only be used for modeling individual identity as a random effect. However, when I set sigmaphi.pool = list(formula=~pool) I do get different model results than when I set sigmaphi.id = list(formula=~1), so what is the first formula doing, if not using pool as a random effect?
Below is some example code
- Code: Select all
#hib indicates the treatment group
d.processed=process.data(mm2, groups=c("hib","pool"),
time.intervals=surveyintervals, model="CJSRandom")
d.ddl=make.design.data(d.processed)
phi.hib <- list(formula=~hib)# covariate-dependent
phi.none <- list(formula=~1)#
sigmaphi.pool = list(formula=~pool)
pct = list(formula=~1)
m.hib <- mark(d.processed,d.ddl,model.parameters=list(Phi=phi.hib,
p=pct,sigmap=sigmap.fixed,
sigmaphi=sigmaphi.pool),output = T,delete=T)
m.rand <- mark(d.processed,d.ddl,model.parameters=list(Phi=phi.none,
p=pct,sigmap=sigmap.fixed,
sigmaphi=sigmaphi.pool),output = T,delete=T)
2. My second question is: if I can't use RMark, is it possible to implement this type of model in the marked package? I am more familiar with RMark than marked and got stuck in marked with the following error:
- Code: Select all
d.processed=process.data(mm2, groups=c("hib","pool"),
time.intervals=surveyintervals, model="CJS")
d.ddl=make.design.data(d.processed)
model.13=crm(d.processed, d.ddl, external=F, accumulate=F,
use.admb=TRUE, model.parameters=list(Phi=list(formula=~hib+(1|pool)),
p=list(formula=~1)))
#this results in an error:
#Error in crm(d.processed, d.ddl, dml, accumulate = F, use.admb = T, model.parameters = list(Phi = #list(formula = ~hib + : data cannot be accumulated (freq>1) except with temporal random effects only; set #accumulate=FALSE
Thanks for any help that anyone can offer.