You are here

mxCompare(oneModelOnly)

the old gen_epi helper tableFitStatistics(fit) would accept just one parameter, and describe that model's fit:
> tableFitStatistics(fit)
Name ep -2LL df AIC
Model 1 : top 7 2964.37 468 2028.37

The built-in replacement throws an error when the comparison list is omitted:
> mxCompare(fit)
Error in mxCompare(fit) :
'comparison' argument be a MxModel object or list of MxModel objects
It would be nice if it defaulted to simply give the base model data when no comparison models are provided...

Happy to help if needed

Reporter: 
Created: 
Mon, 07/05/2010 - 12:35
Updated: 
Mon, 07/28/2014 - 21:57

Comments

this can be closed... it was fixed about a year ago

require(OpenMx)
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 = F, values = 1.0),
    mxData(cov(demoOneFactor), type = "cov", numObs = 500)
)
m1 = mxRun(m1)
mxCompare(m1)

Closed