R/logLik.fmsm.R

Defines functions logLik.fmsm

Documented in logLik.fmsm

#' Extract the log likelihood for the fitted multistate model
#'
#' @description
#' It extracts the log-likelihood for a fitted \code{fmsm} model.
#'
#'
#' @param object Fitted model object of class \code{fmsm} produced by function \code{\link{fmsm}}.
#' @param ... Unused in this case.
#'
#' @return Standard logLik object.
#'
#' @export logLik.fmsm
#' @export
#'


logLik.fmsm = function(object, ...){

  if (length(list(...))) {
    warning("extra arguments discarded")
  }

  lk <- object$logLik

  attr(lk, "nobs") <- object$n
  attr(lk, "df") <- object$t.edf
  class(lk) <- c("logLik")
  lk

}

Try the flexmsm package in your browser

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

flexmsm documentation built on Sept. 11, 2024, 7:23 p.m.