Page 1 of 1
hcov maximization error with effort covariate

Posted:
Fri Feb 20, 2015 4:38 pm
by sixtystrat
I have some data on polygon searches for mountain lions with hounds and am using the product of miles driven and hours spent searching within each quadrant as a covariate for effort. To account for differences in sex, I am using the hcov argument but am getting the dreaded "Probable maximization error..." usually associated with the first usage value not equal to 1. However, the covariates are large integers e.g., for 1 year...
loc_id x y V1
1 1 810668 5436071 121.288503
2 2 815668 5436071 20.776730
3 3 820668 5436071 173.429541
4 4 825668 5436071 205.041431
How do I code the trap data to get rid of this error? The covariate values are different every year so any kind of standardization won't work. Thanks!
Joe
Re: hcov maximization error with effort covariate

Posted:
Fri Feb 20, 2015 5:06 pm
by murray.efford
Hi Joe
It's not quite clear to me how you are aiming to use the 'covariate' - presumably as 'effort' in the usage matrix. It looks like you have discretized the search polygons - which is good as it removes potential hassles with integration over the polygons. The fastest solution is probably to send me an example dataset and code. [I can imagine a bug associated with 'usage' when there is a single sampling occasion as R often needs drop = FALSE when a subscripted 2-D matrix has 1 remaining dimension, or maybe the effort variable needs to be scaled...]
Murray
(And did you mean large reals rather than large integers?)
Re: hcov maximization error with effort covariate

Posted:
Fri Feb 20, 2015 5:21 pm
by sixtystrat
Yes, I mean real numbers...duh. I sent you some code and data files. Yes, the covariates are for effort. I did not code the traps (polygons) as inactive (0) or active (1) because I was not sure that would work along with the covariates and because inactive traps had a value of 0.00000 for effort. Thanks much for your (always speedy) replies!
Joe
Re: hcov maximization error with effort covariate

Posted:
Sun Feb 22, 2015 3:50 pm
by murray.efford
Strictly, you are not using covariates at all. The 'effort' values are saved in the 'usage' attribute of the detector ('traps') object and used like an offset (see MEE 4:629-636).
In my tests the analysis seems to work fine. Choosing maximisation method = 'BFGS' does result in some warning messages when the algorithm tries implausible parameter values, but the final estimates are numerically indistinguishable from those with method = 'Newton-Raphson' (the default).
Murray
Re: hcov maximization error with effort covariate

Posted:
Mon Feb 23, 2015 11:25 am
by sixtystrat
Thanks for the help Murray. The estimates look good but I'm curious about g0, which is about 0.0003. We captured from 10 to 29 different animals each year in an estimated population of 54 to 84 within our sampling grid. Seems like g0 should be higher.
Re: hcov maximization error with effort covariate

Posted:
Mon Feb 23, 2015 1:23 pm
by sixtystrat
Perhaps that is due to the "effort" offset? If so, probably the same thing for sigma...
Re: hcov maximization error with effort covariate

Posted:
Mon Feb 23, 2015 3:36 pm
by murray.efford
Yes, if you use large numbers for effort, the unit effort is small. This does not affect sigma.
Re: hcov maximization error with effort covariate

Posted:
Mon Feb 23, 2015 5:21 pm
by sixtystrat
Great. Thank you very much for your help!
Joe