Survey level covariates for Delta in multi-state occupancy?

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

Survey level covariates for Delta in multi-state occupancy?

Postby ben becker » Wed Oct 30, 2019 12:47 pm

Hi,

Does the "RDMSOccRepro" 3-state occupancy model in RMark support survey level covariates for Delta (p(detect breeding|breeding))?

The models run just fine with survey level covariates (like Julian date, month, etc) for p, but those same covariates will not run for Delta. I have no problem running .ddl covariates ("Delta 2") as in the NicholsMSOccupancy example or or site level for covariates for Delta.

Here is the code:
Code: Select all
 ## runs fine with ddl covariate for Delta
  mod.MS.test.delta2 =      mark(NSO.data, nso.RDMSOccRepro.ddl,
                              model.parameters = list(
                              Phi0 =  Phi0.dot,
                              Psi =   Psi.stratum,
                              R =     R.dot,
                              p =     p.month,               ## survey level covariate
                              Delta = Delta.delta2))         ## ddl covariate

## runs fine with site level covariate for Delta
    mod.MS.test.delta.BO = mark(NSO.data, nso.RDMSOccRepro.ddl,
                               model.parameters = list(
                               Phi0 =  Phi0.dot,
                               Psi =   Psi.stratum,
                               R =     R.dot,
                               p =     p.month,      ## survey level covariate
                               Delta = Delta.BO))  ## site level covariate
         
  ## does NOT run using same covariate that worked for p in previous model
  mod.MS.test.delta.month = mark(NSO.data, nso.RDMSOccRepro.ddl,
                               model.parameters = list(
                               Phi0 =  Phi0.dot,
                               Psi =   Psi.stratum,
                               R =     R.dot,
                               p =     p.month,      ## survey level covariate
                               Delta = Delta.month)) ## CRASHES...same survey level covariate used in p
 
ERRORS:
  Error in make.mark.model(data.proc, title = title, parameters = model.parameters,  :
                             
  Error: Variable mon used in formula is not defined in data
                           
  Error in mark(NSO.data, nso.RDMSOccRepro.ddl, model.parameters = list(Phi0 = Phi0.dot,  :
     Misspecification of model or internal error in code

My guess is that I am missing something fundamental and that survey level covariates are simply not compatible with Delta. Using RMark 2.2.6 and R 3.6.0

Thanks!
ben becker
 
Posts: 1
Joined: Tue Oct 29, 2019 7:00 pm

Re: Survey level covariates for Delta in multi-state occupan

Postby jlaake » Wed Oct 30, 2019 1:29 pm

Ben-

Please send me data and code you are using and I'll look at it. jefflaake@gmail.com
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Survey level covariates for Delta in multi-state occupan

Postby jlaake » Mon Nov 04, 2019 4:57 pm

I worked with Ben on this offlist. The problem was that p and Delta use different values of time and the covariates were named to match p but not Delta. When you get errors like this check the design data values for the parameter.
jlaake
 
Posts: 1417
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 13 guests

cron