openCR.fit cannot find mask covariate
Posted: Wed Aug 25, 2021 8:15 pm
I successfully (I think) included a geographic covariate into my mask; but, I cannot get openCR.fit to include that covariate in a model. Here is an example using the oven bird data set:
I get
I have read nearly all of the secr and openCR vignettes (a lot of material! thank you Murray). They relate how one constructs the mask covariates, but not an example of included them in a model. I hope I did not miss it.
How do we fit a mask covariate in a model?
- Code: Select all
testCH <- ovenCH[[1]]
testMask <- ovenmask[[1]]
covariates(testMask) <- data.frame(XX = c(rep(0,1000), rep(1, dim(testMask)[1] - 1000)))
fit <- openCR::openCR.fit(
capthist = testCH,
type = "PLBsecrf",
model = list(lambda0 ~ 1,
f ~ XX,
phi ~ 1,
sigma ~ XX),
mask = testMask,
detectfn = "HHN",
movementmodel = "static",
trace = TRUE,
ncores = 1
)
I get
- Code: Select all
Preparing design matrices
Error in openCR.design(capthist = capthist, models = model, type = type, :
covariate(s) XX not found
I have read nearly all of the secr and openCR vignettes (a lot of material! thank you Murray). They relate how one constructs the mask covariates, but not an example of included them in a model. I hope I did not miss it.
How do we fit a mask covariate in a model?