Page 1 of 1

CJSRandom and other methods for random effects in CJS Models

PostPosted: Tue Apr 07, 2020 6:14 pm
by t1820
Hello,

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.

Re: CJSRandom and other methods for random effects in CJS Mo

PostPosted: Tue Apr 07, 2020 7:00 pm
by jlaake
Q1. that just set the value of sigmaPhi to vary by pool. But the variation is still from one individual to the next but the amount of individual variation could differ across pools. You could use CJS and fit a fixed effect of pool and then use Variance Components to estimate variation across pools.

Q2. Yes you can and all you need to do is move accumulate=FALSE to the process.data function. If you don't want to install admb you can set use.tmb=TRUE.

How many pools do you have? If you have further questions about marked please post on the marked subforum.

--jeff

Re: CJSRandom and other methods for random effects in CJS Mo

PostPosted: Wed Apr 08, 2020 12:00 am
by t1820
Hi Jeff,

Thanks very much for your help--it is much appreciated.

Regarding Q1, just to make sure I understand: are you saying that by defining sigmaphi.pool = list(formula=~pool), that would model the data with each individual having its own random offset from the population mean, and with each pool having its own random offset from the population mean? i.e., sigmaphi.pool would model individual-level and pool-level heterogeneity in phi? Is it nesting individual within pool?

Thanks again for your help. If I have questions about marked I will be sure to post those in the correct forum.

Take care,

Re: CJSRandom and other methods for random effects in CJS Mo

PostPosted: Wed Apr 08, 2020 8:49 am
by jlaake
Not quite. There is no offset for each pool. Only sigma varies by pool. Survival for individuals in pool i follow a Normal distribution with 0 mean and standard deviation sigma_i.