How do I get a CI on a parameter derived from a model?
Posted on
tbates
Joined: 07/31/2009
Forums
umxSummary reports the rA, rC, and rE for models. But this is done in the summary, and doesn't include CIs by default.
It’s computed as
solve(sqrt(I*A)) %*% A %*% solve(sqrt(I*A))
So you can add an mxAlgebra computing that into the model, then do mxSE on that
m2 = mxModel(m1,
mxAlgebra(name="ra", solve(sqrt(top.I*top.A)) %*% top.A %*% solve(sqrt(top.I*top.A)))
)
m2 = mxRun(m2)
mxSE(ra, m2)
That returns SEs, and CI= ± 1.96 * SE
best, t
mxSE vs mxCI
mxCI takes longer to run than mxSE, but the results of mxCI, which permits asymmetric confidence intervals, can be more informative.
Log in or register to post comments
confint
confint
is also available. This use is likeconfint(yourModel)
# or
confint(yourModel, level=.82) # for 82% confidence intervals
# or
confint(yourModel, level=.70, parm='Greg') # 70% CI on a parameter named 'Greg'
However, these confidence intervals are based on the standard errors (Wald-type CIs), so the same caveats as Mike Neale alluded to still apply. In my experience, SE-based CIs are often "good enough" for unbounded parameters, but profile likelihood CIs (e.g. from
mxCI
) are far superior for bounded parameters like variances.Log in or register to post comments