Defines functions info.criterion

Documented in info.criterion

info.criterion <-
function(logl, n = NULL, k = NULL,
  method = c("sc", "aic", "aicc", "hq"))
#check arguments:
if (!is.numeric(logl))
  stop(" Non-numeric argument to logl")
  stop(" Value n is NULL")
  stop(" Value k is NULL")

method <- match.arg(method)
#info.val <- NULL

#Schwarch criterion
if(method == "sc") info.val <- -2*logl/n + k*log(n)/n

#Akaike criterion
if(method == "aic") info.val <- -2*logl/n + 2*k/n

#AICC of Hurvich and Tsai (1989):
if(method == "aicc") info.val <- -2*logl/n + 2*k/(n-k-1)

#Hannan-Quinn criterion
if(method == "hq") info.val <- -2*logl/n + 2*k*log(log(n))/n

#out values:
out <- list()
out$method <- method
out$n <- n
out$k <- k
out$value <- info.val


gets documentation built on May 20, 2017, 1:56 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.