R/logLik.R

Defines functions logLik.garma_model

Documented in logLik.garma_model

#' Log Likelihood
#'
#' The approximate likelihood for the model.
#' @param object The garma_model object
#' @param ... Other parameters. Ignored.
#' @return Object of class "logLik" with values for the (approx) log-likelihood for the model
#' @export
logLik.garma_model <- function(object, ...) {
  # Need to figure out how to indicate these are REML estimates not true LL.
  res <- structure(object$loglik, df = length(object$y) - 1, nobs = length(object$y), class = "logLik")
  return(res)
}

Try the garma package in your browser

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

garma documentation built on April 4, 2025, 2:13 a.m.