Obtain 95%CI for ACE model- script revised from Dorothy Bishop
Posted on
camus
Joined: 03/21/2019
Attachment | Size |
---|---|
DB ACE_revised.doc | 55 KB |
twindata.csv | 20.2 KB |
Forums
Hi, I am new with R and OpenMx. Recently I revised Dorothy Bishop's script to run ACE models. However, her original code could not get the 95%CI for of A,C,E estimates, but only 95%CI for Unsquared path estimates. I know mxCI() can obtain 95%CI, but after various attempts, it never works for me. Could any expert have a look of the code and let me know how should I add it?
Thanks!
Thanks!
Unless I'm missing something,
mxCI(c("A","C","E"))
into the MxModel you're naming "twinACE", and passintervals=TRUE
tomxRun()
.Log in or register to post comments
In reply to Unless I'm missing something, by AdminRobK
Thanks much for your response
expMeans_ACE <- mxEval(expMean, twinACEFit) # expected mean
A_ACE <- mxEval(a*a, twinACEFit) # additive genetic variance, a^2
C_ACE <- mxEval(c*c, twinACEFit) # shared environmental variance, c^2
E_ACE <- mxEval(e*e, twinACEFit) # unique environmental variance, e^2
V <- (A_ACE+C_ACE+E_ACE) # total variance
a2_ACE <- A_ACE/V # standardized additive genetic variance
c2_ACE <- C_ACE/V # standardized shared environmental variance
e2_ACE <- E_ACE/V # standardized unique environmental variance
Should I add `mxCI(c("a2_ACE"," c2_ACE "," e2_ACE"))` to somethere? Thanks again for your help!
Log in or register to post comments
mxSE, mxAlgebra, mxCI, and umx
Options include `mxSE(A_ACE/V, model)` or adding functions like this to the twin model:
`mxAlgebra(name= "A_std", A_ACE/V)`
you can then request `mxCI("A_std")` and `intervals= TRUE` in the mxRun()
Finally: Check out the umx package twin modelling functions like `umxACE`
[https://cran.r-project.org/web/packages/umx](https://cran.r-project.org/web/packages/umx)
and the accompanying open access paper
Bates, T. C., Neale, M. C., & Maes, H. H. (2019). umx: A library for Structural Equation and Twin Modelling in R. *Twin Research and Human Genetics*, **22**, 27-41. [link](https://www.cambridge.org/core/journals/twin-research-and-human-genetics/article/umx-twin-and-pathbased-structural-equation-modeling-in-r). doi:10.1017/thg.2019.2
Log in or register to post comments