Learn R Programming

umx (version 1.4.0)

logLik.MxModel: logLik.MxModel

Description

Returns the log likelihood for an OpenMx model. This helper also enables AIC(model); BIC(model).

Usage

"logLik"(object, ...)

Arguments

object
the mxModel from which to get the log likelihood
...
Optional parameters

Value

- the log likelihood

Details

hat-tip Andreas Brandmaier

References

- http://openmx.psyc.virginia.edu/thread/931#comment-4858

See Also

- AIC, umxCompare

Other Reporting functions: RMSEA.MxModel, RMSEA.summary.mxmodel, RMSEA, confint.MxModel, extractAIC.MxModel, loadings, plot.MxModel, residuals.MxModel, umxCI_boot, umxCI, umxCompare, umxExpCov, umxExpMeans, umxFitIndices, umxPlotACEcov, umxPlotACE, umxPlotCP, umxPlotGxE, umxPlotIP, umxSummary.MxModel, umxSummaryACE, umx_drop_ok, umx_standardize_RAM

Examples

Run this code
require(umx)
data(demoOneFactor)
latents  = c("G")
manifests = names(demoOneFactor)
m1 <- mxModel("One Factor", type = "RAM", 
	manifestVars = manifests, latentVars = latents, 
	mxPath(from = latents, to = manifests),
	mxPath(from = manifests, arrows = 2),
	mxPath(from = latents, arrows = 2, free = FALSE, values = 1.0),
	mxData(cov(demoOneFactor), type = "cov", numObs = 500)
)
m1 = umxRun(m1, setLabels = TRUE, setValues = TRUE)
logLik(m1)
AIC(m1)

Run the code above in your browser using DataLab