Error with behavioral response models when using a mask

Hello,
I am having some problems with fitting certain models using a polygon-clipped mask object. I created the mask using the make.mask() function as follows:
I have been able to successfully use this mask object to fit both simple models and models with animal-specific covariates. For example:
However, when I try to fit any other sort of model (b, B, bk, Bk, k, or K), as in the following example:
I receive the following error message(s):
The code works just fine if I remove the mask parameter and add in a buffer parameter instead. I suppose this would be okay, but I'd prefer to use my polygon-clipped mask object. Is there something I have forgotten to specify in my model statement or in the secr.fit() statement?
Thanks!
Jason
I am having some problems with fitting certain models using a polygon-clipped mask object. I created the mask using the make.mask() function as follows:
- Code: Select all
mask <- make.mask(trapLocs, buffer=7000, type='trapbuffer', poly=kuiu.poly, keep.poly=T)
I have been able to successfully use this mask object to fit both simple models and models with animal-specific covariates. For example:
- Code: Select all
secr0 <- secr.fit(captHist, mask=mask, detectfn=0, CL=T, trace=T)
secr.sex <- secr.fit(captHist, model=list(g0~Sex, sigma~Sex), mask=mask, detectfn=0, CL=T, trace=T)
However, when I try to fit any other sort of model (b, B, bk, Bk, k, or K), as in the following example:
- Code: Select all
secr.B <- secr.fit(captHist, model=list(g0~B, sigma~1), mask=T, trace=T, CL=T, detectfn=0)
I receive the following error message(s):
Checking data
no verify method for objects of class logical
Error in if (notOK) stop("'verify' found errors in 'mask' argument") :
argument is of length zero
The code works just fine if I remove the mask parameter and add in a buffer parameter instead. I suppose this would be okay, but I'd prefer to use my polygon-clipped mask object. Is there something I have forgotten to specify in my model statement or in the secr.fit() statement?
Thanks!
Jason