R/AIC.dsmodel.R

Defines functions AIC.dsmodel

Documented in AIC.dsmodel

#' Akaike's An Information Criterion for detection functions
#'
#' Extract the AIC from a fitted detection function.
#'
#' @param object a fitted detection function object
#' @param k penalty per parameter to be used; the default \code{k = 2} is the "classical" AIC
#' @param \dots required for S3 but ignored
#' @author David L Miller
#' @export
#' @importFrom stats logLik
AIC.dsmodel <- function(object, ..., k=2){

  # see also logLik.dsmodel
  ll <- logLik(object)
  return(-2*ll + k*attr(ll, "df"))
}

Try the Distance package in your browser

Any scripts or data that you put into this service are public.

Distance documentation built on July 4, 2017, 9:29 a.m.