Confidence Interval(CI)
Posted on

Forums
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.
?mxCI
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!
Log in or register to post comments
In reply to ?mxCI by mhunter
Thanks
Thanks, mhunter. Sorry to reply so late. This is really of great help to me. Thanks a lot.
Log in or register to post comments