I am currently working on a project where I want to estimate the density of an island population of feral cats. Camera traps were placed on the island and were moved around over a couple of months to cover the whole island.
I am using SECR to obtain my density estimates, and I constructed a simple model with a hazard rate detection function without any problems. I expected density to be influenced by distance to major roads (DTRL), as feral cats may avoid humans.
- Code: Select all
covariates(Schiermask)[,"DTRL"] <- distancetotrap(Schiermask, LargeRoadsPoints)
fit.road.HR <- secr.fit (CH, buffer = bufferwidth, detectfn = 'HR', trace = T, mask = Schiermask, D ~ DTRL)
When plotting the mask with distance to roads, everything looks fine, but when running the model I get the following error:
Error in getmaskpar(!CL, D, data$m, sessnum, details$unmash, attr(data$capthist, :
bad densities in 'secrloglikfn' (try different optimisation method, link, or model?
I tried changing the method to Nelder-Mead, but I got the same error message. However, when I started randomly playing around with the link, the model actually fitted.
- Code: Select all
fit.road.HR <- secr.fit (CH, buffer = bufferwidth, detectfn = 'HR', trace = T, mask = Schiermask, D ~ DTRL, link = list(D="logit", g0="logit", sigma="log", z ="log"))
While this is nice,I actually have no idea if using this link function makes any sense. Are there data distributions for D, g0, sigma and z? How do I select the right link function?
Any help is greatly appreciated!
Hilbert