Learn R Programming

Rdistance (version 1.3.2)

AIC.dfunc: AICc and related fit statistics for detection function objects

Description

Computes AICc, AIC, or BIC for estimated distance functions.

Usage

# S3 method for dfunc
AIC(object, …, k = 2, n=length(object$dist))

Arguments

object

An estimated detection function object. An estimated detection function object has class 'dfunc', and is usually produced by a call to F.dfunc.estim.

Required for compatability with the general AIC method. Any extra arguments to this function are ignored.

k

Scalar penalty to use in the computations. See Details.

n

Scalar sample size to use in computations. See Details.

Value

A scalar. By default, the value of AICc for the estimated distance funciton obj.

Details

Regular Akaike's information criterion (http://en.wikipedia.org/wiki/Akaike_information_criterion) (\(AIC\)) is $$AIC = LL + 2p,$$ where \(LL\) is the maximized value of the log likelihood (more specifically, the minimized value of the negative log likelihood) and \(p\) is the number of coefficients estimated in the detection function. For dfunc objects, \(AIC\) = obj$loglik + 2*length(coef(obj)). A correction for small sample size, \(AIC_c\), is $$AIC_c = LL + 2p + \frac{2p(p+1)}{n-p-1},$$ where \(n\) is sample size or number of detected groups for distance analyses. By default, this function computes \(AIC_c\) because it converges to \(AIC\) for large \(n\) and is therefore generally prefered.

By changing the parameters k and n, it is possible to compute at least three measures of model fit. These are:

  • Setting k = 2 and n = Inf produces AIC.

  • Setting k = log(\(n\)) and n = Inf produces the Bayesian Information Criterion, or BIC.

  • Setting k = 2 and n = \(n\) produces \(AIC_c\) (the default).

References

Burnham, K. P., and D. R. Anderson, 2002. Model Selection and Multimodel Inference: A Practical Information-Theoretic Approach, 2nd ed. Springer-Verlag. ISBN 0-387-95364-7.

McQuarrie, A. D. R., and Tsai, C.-L., 1998. Regression and Time Series Model Selection. World Scientific. ISBN 981023242X

See Also

coef, F.dfunc.estim

Examples

Run this code
# NOT RUN {
# Load the example dataset of sparrow detections from package
data(sparrow.detections)

# Fit detection function to perpendicular, off-transect distances
dfunc <- F.dfunc.estim(sparrow.detections, w.hi=150)

# Compute fit statistics
AIC(dfunc)  # AICc
AIC(dfunc, k=2, n=Inf)  # AIC
AIC(dfunc, k=log(length(dfunc$dist)), n=Inf)  # BIC
# }

Run the code above in your browser using DataLab