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!