umxACE, same/different sex twins

Posted on
No user picture. JErola Joined: 02/18/2021
Forums
Hello,

We are fitting twin ACE models (and hopefully later twin ACE Cholesky models) using Finnish register data with no information on twin's zygosity, relying on same/different sex identification approach. This seems to be pretty straightforward with OpenMX but we have not found a way to do it with umxACE. Presumably, this is something that could be achieved with umxModify by changing paths but we were not able figure out how and were not able to find any examples either. Any suggestions how to proceed?

Best, Jani

Replied on Thu, 03/18/2021 - 07:59
Picture of user. AdminNeale Joined: 03/01/2013

Hi

The model you wish to fit is best described as a mixture distribution, following Neale (2003). There are two scripts in the repository that may help, Acemix.R is one, Acemix2.R is the other. In your case, there is no need for the DZ parts of the script, you simply mark the probability of being MZ as (1-(2*NdzosPairs/Ntotalpairs)).

Unfortunately, these are univariate scripts, and worse they are set up in a Cholesky style. I do not recommend the Cholesky approach in general, per Verhulst et al 2019. However, it would not be so difficult to modify it to use the direct symmetric approach. Get rid of the A C and E algebras and make the X Y and Z matrices symmetric, and rename them as A C and E.

mxMatrix("Full", nrow=1, ncol=1, free=TRUE, values=.6, lbound=.01 , label="a", name="X"),
mxMatrix("Full", nrow=1, ncol=1, free=TRUE, values=.6, lbound=.01 , label="c", name="Y"),
mxMatrix("Full", nrow=1, ncol=1, free=TRUE, values=.6, lbound=.1, ubound=10, label="e", name="Z"),
# Matrixes A, C, and E to compute A, C, and E variance components
mxAlgebra(X * t(X), name="A"),
mxAlgebra(Y * t(Y), name="C"),
mxAlgebra(Z * t(Z), name="E"),

Becomes

mxMatrix("Symm", nrow=nvar, ncol=nvar, free=TRUE, values=.6, name="A"),
mxMatrix("Symm", nrow=nvar, ncol=nvar, free=TRUE, values=.6, name="C"),
mxMatrix("Symm", nrow=nvar, ncol=nvar, free=TRUE, values=.6, name="E"),

And you would set the number of variables earlier in the script before the model definition with e.g., nvar<-5

HTH!

Replied on Thu, 03/18/2021 - 16:56
No user picture. JErola Joined: 02/18/2021

Excellent, we will have a try!
Best, Jani