cannot find mask covariate

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis. cannot find mask covariate

Postby tmcdonald » Wed Aug 25, 2021 8:15 pm

I successfully (I think) included a geographic covariate into my mask; but, I cannot get to include that covariate in a model. Here is an example using the oven bird data set:

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 <-
  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 = 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?
Posts: 8
Joined: Wed Dec 05, 2007 3:41 pm
Location: Laramie, WY

Re: cannot find mask covariate

Postby murray.efford » Thu Oct 21, 2021 5:51 pm

Sorry I overlooked this question. Indeed, openCR does not use mask covariates. This is mentioned obscurely as footnote 6 on page 5 of the vignette (!) and also as a difference from 'secr' on page 27:
"These features of secr are not available in openCR
5. Density surfaces and other spatial density models

Of course it could be done, but maybe that's just too ambitious with real datasets. In general I think density (uniform or modelled) is better handled in closed population models, with open models kept for when they are really needed (vital rates).

Posts: 645
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest