R/logLik.compareAIC.R

Defines functions logLik.compareAIC

Documented in logLik.compareAIC

#' logLik.compareAIC Return Log Likelihood of a fit
#' @title Return Log Likelihood generated by FormatCompareAIC
#' @author Marc Girondot \email{marc.girondot@@gmail.com}
#' @return The Log Likelihood value for the fitted model with data
#' @param object A result generated by FormatCompareAIC
#' @param ... Not used
#' @description Return Log Likelihood generated by FormatCompareAIC
#' @family AIC functions
#' @examples
#' \dontrun{
#' ED <- FormatCompareAIC(logLik=-140, nobs=100, df=3)
#' logLik(ED)
#' }
#' @method logLik compareAIC
#' @export


logLik.compareAIC <- function(object, ...) {
  l <- object$logLik
  attributes(l) <- list(nall=attributes(object)$nall, 
                                                  nobs=attributes(object)$nobs, 
                                                  df=attributes(object)$df)
    return(l)
}

Try the HelpersMG package in your browser

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

HelpersMG documentation built on Oct. 5, 2023, 5:08 p.m.