deviance {secr} | R Documentation |
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 class 'secr'
deviance(object, ...)
## S3 method for class 'secr'
df.residual(object, ...)
Arguments
object |
secr object from secr.fit |
... |
other arguments (not used) |
Details
The deviance is , where
is the value of the
log-likelihood evaluated at its maximum, and
is the
log-likelihood of the saturated model, calculated thus:
Likelihood conditional on -
Full likelihood, Poisson -
Full likelihood, binomial -
is the number of individuals observed at least once,
is the number of distinct histories, and
is the number in a chosen area
that we estimate by
.
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 with
degrees of
freedom when
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
.
sim.secr
is a convenient tool.
Value
The scalar numeric value of the deviance or the residual degress of freedom extracted from the fitted model.
References
Borchers, D. L. and Efford, M. G. (2008) Spatially explicit maximum likelihood methods for capture–recapture studies. Biometrics 64, 377–385.
See Also
Examples
deviance(secrdemo.0)
df.residual(secrdemo.0)