I posted a thread to this forum earlier this month (thank you for all your help, by the way). To reiterate, I am working with a lab group analyzing mark recapture data from a population of male butterflies. We are currently trying to run a model with habitat type as a covariate for density and the detection parameter sigma. We have successfully created a capthist object and a habitat mask which includes a covariate for habitat type (hab_type). We have also run models in which habitat type has been identified as a covariate for density.
- Code: Select all
secr.fit2012.1 = secr.fit(capthist2012_2, model = D ~ hab_type, mask = habitatmask_new, buffer = 140, CL = T, method = "Nelder-Mead")
However, when we try to run the following code, in which a covariate is specified for sigma, an error message pops up.
- Code: Select all
secr.fit2012.2 = secr.fit(capthist2012_2, model = list (D ~ hab_type, sigma ~ hab_type), mask = habitatmask_new, buffer = 140, CL = T, method = "Nelder-Mead")
Error in secr.design.MS(capthist, model, timecov, sessioncov, groups, :
covariate(s) hab_type not found
My impression from the manual is that it is possible to include user-defined predictors from trap covariates.
I am unsure of which steps to take in order to run a model which includes habitat type as a covariate for density and the detection parameter sigma.
Thank you for your time and your help.
Genevieve