R/AIC.R

Defines functions BIC.eblupres AIC.eblupres

Documented in AIC.eblupres BIC.eblupres

#' Akaike's An Information Criterion.
#'
#' @description Generic function calculating Akaike's "An Information Criterion" for EBLUP model
#'
#' @param object EBLUP model.
#' @param ... further arguments passed to or from other methods.
#'
#' @return AIC value.
#'
#' @examples
#' m1 <- eblupfh_cluster(y ~ x1 + x2 + x3, data = mys, vardir = "var", cluster = "clust")
#' AIC(m1)
#'
#' @export
AIC.eblupres <- function(object, ...) {
  return(object$fit$goodness[2])
}

#' @rdname AIC.eblupres
#' @importFrom stats BIC
#' @export
BIC.eblupres <- function(object, ...) {
  return(object$fit$goodness[3])
}

Try the saens package in your browser

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

saens documentation built on April 4, 2025, 4:43 a.m.