R/logLik.STRN.R

Defines functions logLik.STRN

Documented in logLik.STRN

#' logLik.STRN Return Log Likelihood of a fit
#' @title Return Log Likelihood of a fit generated by STRN
#' @author Marc Girondot
#' @return The Log Likelihood value of the fitted model and data
#' @param object A result file generated by STRN
#' @param ... Not used
#' @description Return Log Likelihood of a fit generated by STRN
#' @examples
#' \dontrun{
#' library(embryogrowth)
#' data(resultNest_4p_SSM)
#' logLik(resultNest_4p_SSM)
#' AIC(resultNest_4p_SSM)
#' }
#' @method logLik STRN
#' @export


logLik.STRN <- function(object, ...) {
  l <- -object$value
  attributes(l) <- list(nall=length(object$data$Sexed), nobs=length(object$data$Sexed), df=length(object$par) , class="logLik")
  return(l)
}

Try the embryogrowth package in your browser

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

embryogrowth documentation built on Sept. 11, 2024, 8:16 p.m.