Error using session/cohort in model parameters

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Error using session/cohort in model parameters

Postby tryingmybest » Tue Oct 22, 2019 8:10 am

Hi all,

I'm trying to run p.session=list(formula=~session) and I have had no problems with this before using a crdms.

When I try and run this using a popan model I get the following error;

Code: Select all
Error in make.mark.model(data.proc, title = title, parameters = model.parameters,  :
 
Error: Variable session used in formula is not defined in data

Error in mark(capt.pr, ddl = capt.ddl, time.intervals = x, model.parameters = list(pent = pent.dot,  :
  Misspecification of model or internal error in code


I have also tried this with p.session, and get the same error. Why did I not get this error when using session and cohort with crdms?

Do I need to predefine cohorts in the .ddl somehow, rather than mark automatically knowing?

Also am I right in thinking session and cohorts can be used interchangeably?

Cheers for helping
tryingmybest
 
Posts: 10
Joined: Tue Aug 06, 2019 12:17 pm

Re: Error using session/cohort in model parameters

Postby jlaake » Tue Oct 22, 2019 8:49 am

Session is only for robust designs and popan is not a robust design model. Look in the ddl for each parameter to see what variables are pre-defined.
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Error using session/cohort in model parameters

Postby tryingmybest » Tue Oct 22, 2019 9:14 am

jlaake wrote:Session is only for robust designs and popan is not a robust design model. Look in the ddl for each parameter to see what variables are pre-defined.


Hi Jlaake thanks for the reply. Makes sense re. the session in RD.
Had a look in the ddl, and I have group, age/Age and time/Time. The group just brings up a 1. Could you explain the group variable- is this the equivalent of cohort, if some alterations are made to it?

Cheers,

Tom
tryingmybest
 
Posts: 10
Joined: Tue Aug 06, 2019 12:17 pm

Re: Error using session/cohort in model parameters

Postby jlaake » Thu Oct 24, 2019 12:54 pm

group is a set of the combinations of variables you use in groups argument in process.data. It is the manner in which factor variables are handled in RMark/MARK. For each group, a set of PIMS are created. All of this should be very apparent to you if you read the documentation for MARK and RMark.

Also there is an entire chapter on POPAN models in Cooch and White. POPAN is like the other Jolly-Seber models. They use square PIMS - actually just a single row for a group. Whereas, CJS type models use a triangular PIM. Columns in the PIMS always represent time. Rows in a triangular PIM are cohorts which are sets of releases. Diagonals of PIMS represent time since release (age). If you want to use an equivalent of cohorts in a Jolly-Seber model you would have to create a group for each set of unmarked animals first caught at each time. However, unlike CJS models POPAN and other JS models, use the first capture event in the likelihood. Thus, you should only use cohort as a covariate for variables that are conditional on first capture like survival.
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Error using session/cohort in model parameters

Postby jlaake » Thu Oct 24, 2019 12:59 pm

You can use process.ch to get the occasion for the first 1 (cohort) of each capture history record and use that to create a group variable if that is what you want to do.
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: No registered users and 2 guests