R/getLikelihood.R

Defines functions getLikelihood

getLikelihood<-function(model)
{
  # this seems to be not generic enough
  #  return(OpenMx::mxEval(objective, model));
  
  msm <- getS3method("summary","MxModel")
  # alternative:
  if (is.null(model)) {
    warning("NULL Model in getLikelihood()-call")
    return(NULL)
  }
  
  return(msm(model)$Minus2LogLikelihood)
  
  }

Try the semtree package in your browser

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

semtree documentation built on Nov. 26, 2023, 5:07 p.m.