Troubleshooting {secr}R Documentation

Problems in Fitting SECR Models

Description

Although secr.fit is quite robust, it does not always work. Inadequate data or an overambitious model occasionally cause numerical problems in the algorithms used for fitting the model, or problems of identifiability, as described for capture–recapture models in general by Gimenez et al. (2004). Here are some tips that may help you.

This page has largely been superceded by secr-troubleshooting.pdf.

The log-likelihood values shown with trace = TRUE are all NA

Most likely you have infeasible starting values for the parameters. try some alternatives, specifying them manually with the start argument.

secr.fit finishes, but some or all of the variances are missing

This usually means the model did not fit and the estimates should not be trusted. Extremely large variances or standard errors also indicate problems.

See also the section ‘Potential problems’ in secr-densitysurfaces.pdf.

secr.fit finishes with warning nlm code 3

This condition does not invariably indicate a failure of model fitting. Proceed with caution, checking as suggested in the preceding section.

secr.fit crashes part of the way through maximization

A feature of the maximization algorithm used by default in nlm is that it takes a large step in the parameter space early on in the maximization. The step may be so large that it causes floating point underflow or overflow in one or more real parameters. This can be controlled by passing the ‘stepmax’ argument of nlm in the ... argument of secr.fit (see first example). See also the previous point about scaling of covariates.

secr.fit demands more memory than is available

This is a problem particularly when using individual covariates in a model fitted by maximizing the conditional likelihood. The memory required is then roughly proportional to the product of the number of individuals, the number of occasions, the number of detectors and the number of latent classes (for finite-mixture models). When maximizing the full-likelihood, substitute ‘number of groups’ for 'number of individuals'. [The limit is reached in external C used for the likelihood calculation, which uses the R function ‘R_alloc’.]

The mash function may be used to reduce the number of detectors when the design uses many identical and independent clusters. Otherwise, apply your ingenuity to simplify your model, e.g., by casting ‘groups’ as ‘sessions’. Memory is less often an issue on 64-bit systems (see link below).

Estimates from mixture models appear unstable

These models have known problems due to multimodality of the likelihood. See secr-finitemixtures.pdf.

References

Gimenez, O., Viallefont, A., Catchpole, E. A., Choquet, R. and Morgan, B. J. T. (2004) Methods for investigating parameter redundancy. Animal Biodiversity and Conservation 27, 561–572.

See Also

secr.fit, Memory-limits


[Package secr version 5.0.0 Index]