Goodness-of-fit problems

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

Goodness-of-fit problems

Postby sunda » Mon Apr 11, 2011 1:36 pm


I'm using DENSITY to estimate density of a cat species in Southeast Asia. I have an array of 26 camera trap stations that were active for 4 months. I got 59 "captures" from only 4 individuals, so the data are somewhat limited. (The capture heterogeneity is also huge: 48, 6, 4, and 1 captures per individual.) The density models run fine -unsurprisingly Mh2 is the best-fit model -and give realistic, if fairly imprecise, density estimates. I'm using ML-SERC with a habitat mask and otherwise default settings.

However, I'm now trying to test the Goodness-of-fit of the best-fit model. In the "Options>ML SERC>Advanced" tab I checked the boxes for "Monte Carlo test" and "Report each replicate". My understanding is that I compare the observed deviance/df with the distribution of resampled deviance/df estimates. Upon clicking "Go", the model runs fine at first but then fails with a "Floating point division by zero" error message after usually ~2 replicate runs. A google search suggested that that error could have something to do with the processor being too fast for the software (seems crazy to me), so I tried re-running the model on an older machine. Then it got up to about 6 replicates before failing with the same message.

Any ideas? Thanks so much!!!!!
Posts: 1
Joined: Mon Apr 11, 2011 10:52 am

Re: Goodness-of-fit problems

Postby murray.efford » Mon Apr 25, 2011 12:46 am


Sorry for the delay. Here are some comments, but maybe not what you wanted to hear!

Widely different numbers of captures do not necessarily imply unmodelled heterogeneity in a spatially explicit capture-recapture model (some animals may just have lived closer to the cameras). How did you decide Mh2 was the best model? Are we talking spatial or nonspatial models here? I advise againt fitting SECR mixture models to sparse datasets, and I would be very surprised if they are supported by AIC in your case.

Four individuals is really too few for a formal capture-recapture population analysis. You are free to fit a simple model, and the estimates may be better than nothing, but please don't expect much from model selection etc.

The error you report must be a bug in the program, probably exposed by small sample sizes. The message tells you essentially nothing except that there's a bug. I'm will track it down if you send an example dataset (email traps and captures to address in Help | About Density). If you really want to pursue a Monte Carlo goodness of fit test then it is better to use the R package 'secr' (see e.g. help for function sim.secr). This should be more robust than the equivalent in Density (and 'secr' is being actively maintained).

Posts: 615
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest