You are here

Confidence intervals for ACE and AE model

2 posts / 0 new
Last post
Samaneh2013's picture
Offline
Joined: 06/19/2013 - 17:00
Confidence intervals for ACE and AE model
AttachmentSize
Binary Data new_asb_w2_univariate.R8.64 KB

Hi,

I have a script which runs ok but the main problem is the confidence intervals. For ACE and AE model CI's are the same.

I would greatly appreciate if you could see attached for the codes - I think there might be an error for the CI for the nested model.

Many thanks

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
the top parts look fine. I

the top parts look fine.

I think when you get down to aroound line 189, you're not putting the algebras for which you will request CIs into the right model.
In the top code, you add things like A/V into MZ, then add the CI as MZ.av[1,1] etc, which is what you should be doing.

Down lower you make a CI, then don't add it to the model (line 149). Just add it in.

Then further down, you're retro-fitting CIs to the model (which is fine (but h2 etc are already there, no?), but putting A/V as an algebra into the container model but that container doesn't know about subgroups, so I think you want MZ.A/MZ.V as the algebra, for instance, for stPath_A.

Like this, perhaps?

stPath_A <- mxAlgebra(name = "stPath_A", MZ.A/MZ.V)
CImodel_1 <- mxModel(univACEModel, stPath_A, mxCI(c("stPath_A")))
CImodelFit_1 <- mxRun(CImodel_1, intervals=TRUE)
summary(CImodelFit_1)$CI
Log in or register to post comments