Learn R Programming

secr (version 4.6.9)

deviance: Deviance of fitted secr model and residual degrees of freedom

Description

Compute the deviance or residual degrees of freedom of a fitted secr model, treating multiple sessions and groups as independent. The likelihood of the saturated model depends on whether the `conditional' or `full' form was used, and on the distribution chosen for the number of individuals observed (Poisson or binomial).

Usage

# S3 method for secr
deviance(object, ...)
# S3 method for secr
df.residual(object, ...)

Value

The scalar numeric value of the deviance or the residual degress of freedom extracted from the fitted model.

Arguments

object

secr object from secr.fit

...

other arguments (not used)

Details

The deviance is \(-2log(\hat{L}) + 2log(L_{sat})\), where \(\hat{L}\) is the value of the log-likelihood evaluated at its maximum, and \(L_{sat}\) is the log-likelihood of the saturated model, calculated thus:

Likelihood conditional on \(n\) -

\(L_{sat} = \log(n!) + \sum\limits _{\omega} [n_\omega \log (\frac{n_\omega}{n}) - \log (n_\omega !)]\)

Full likelihood, Poisson \(n\) -

\(L_{sat} = n\log(n) - n + \sum\limits _{\omega} [n_\omega \log (\frac{n_\omega}{n}) - \log (n_\omega !)]\)

Full likelihood, binomial \(n\) -

\(L_{sat} = n\log(\frac{n}{N}) + (N-n)\log(\frac{N-n}{N}) + \log (\frac{N!}{(N-n)!}) + \sum\limits _{\omega} [n_\omega \log (\frac{n_\omega}{n}) - \log (n_\omega !)]\)

\(n\) is the number of individuals observed at least once, \(n_\omega\) is the number of distinct histories, and \(N\) is the number in a chosen area \(A\) that we estimate by \(\hat{N} = \hat{D}A\).

The residual degrees of freedom is the number of distinct detection histories minus the number of parameters estimated. The detection histories of two animals are always considered distinct if they belong to different groups.

When samples are (very) large the deviance is expected to be distributed as \(\chi^2\) with \(n_\omega - p\) degrees of freedom when \(p\) parameters are estimated. In reality, simulation is needed to assess whether a given value of the deviance indicates a satisfactory fit, or to estimate the overdispersion parameter \(c\). sim.secr is a convenient tool.

References

Borchers, D. L. and Efford, M. G. (2008) Spatially explicit maximum likelihood methods for capture--recapture studies. Biometrics 64, 377--385.

See Also

secr.fit, sim.secr

Examples

Run this code

deviance(secrdemo.0)
df.residual(secrdemo.0)

Run the code above in your browser using DataLab