if (FALSE) {
require(umx)
data(demoOneFactor)
latents = c("G")
manifests = names(demoOneFactor)
m1 = mxModel("fact", type="RAM", manifestVars=manifests, latentVars=latents,
mxPath(latents , to = manifests),
mxPath(manifests, arrows = 2),
mxPath(latents , arrows = 2, free = FALSE, values = 1),
mxData(cov(demoOneFactor), type = "cov", numObs=500)
)
m1 = umxRun(m1) # just run: will create saturated model if needed
m1 = umxRun(m1, setValues = TRUE, setLabels = TRUE) # set start values and label all parameters
umxSummary(m1, std = TRUE)
m1 = mxModel(m1, mxCI("G_to_x1")) # add one CI
m1 = mxRun(m1, intervals = TRUE)
residuals(m1, run = TRUE) # get CIs on all free parameters
confint(m1) # OpenMx's SE-based CIs
umxConfint(m1, run = TRUE) # get likelihood-based CIs on all free parameters
m1 = umxRun(m1, tryHard = "yes")
}
Run the code above in your browser using DataLab