Error with behavioral response models when using a mask

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

Error with behavioral response models when using a mask

Postby jnwaite » Thu May 15, 2014 3:28 pm

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:

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
jnwaite
 
Posts: 14
Joined: Thu May 15, 2014 2:24 pm
Location: Juneau, Alaska, USA

Re: Error with behavioral response models when using a mask

Postby jnwaite » Mon May 19, 2014 2:34 pm

Well, I guess I just needed to take the weekend off, because this morning I immediately found my glaringly obvious coding error. I'd delete this message to save the embarrassment, but I can't seem to figure out how to do it. Maybe after I take next weekend off...
jnwaite
 
Posts: 14
Joined: Thu May 15, 2014 2:24 pm
Location: Juneau, Alaska, USA


Return to analysis help

Who is online

Users browsing this forum: No registered users and 2 guests

cron