Confidence Interval(CI)

Posted on
Picture of user. Salutfate Joined: 11/22/2013
Hello everyone!

During the process of getting the result of my twin submodel, I failed to get the CI. For example, in the AE model, I get the a2, e2, but how to show the CI? Of course, I get the CI in the full model ACE. The scripts of submodel are below, should I add something?

# Run AE model
AeModel <- mxModel( AdceFit, name="AE" )
AeModel <- omxSetParameters( AeModel, labels="d11", free=FALSE, values=0 )
AeModel <- omxSetParameters( AeModel, labels="c11", free=FALSE, values=0 )
AeFit <- mxRun(AeModel)
mxCompare(AdceFit, AeFit)
round(AeFit@output$estimate,4)
round(AeFit$Vars@result,4)

Thanks in advance.

Replied on Sat, 04/26/2014 - 13:38
Picture of user. mhunter Joined: 07/31/2009

To get the confidence intervals on parameters labeled "YourConfParam1" and "YourConfParam2" you'd need to add something like the following.


AeConf <- mxCI(c( "YourConfParam1", "YourConfParam2"))
AeModel <- mxModel( AdceFit, AeConf, name="AE" )
AeFitWithCI <- mxRun(AeModel, intervals=TRUE) #Expect this to take longer to run
summary(AeFitWithCI)$CI #Look at CIs

Hope this helps!

Replied on Tue, 04/29/2014 - 20:48
Picture of user. Salutfate Joined: 11/22/2013

In reply to by mhunter

Thanks, mhunter. Sorry to reply so late. This is really of great help to me. Thanks a lot.