You are here

ACE Cholesky; Log Transformed Variables

5 posts / 0 new
Last post
Lux Whitehaven's picture
Offline
Joined: 02/02/2015 - 15:06
ACE Cholesky; Log Transformed Variables
AttachmentSize
Binary Data 2ACE_Chol FINAL.R5.92 KB

Hello everyone! I just had a quick question, if anyone has the time to help.

I'm running a multivariate ACE Cholesky on three variables, and outputting individual pathways a11, a21, a31, etc for a, c, and e, as well as overall heritability and environmental estimates, h2, c2, e2. However, one of those variables, the third input one, had a skewness and kurtosis level just outside acceptable ranges.

I log transformed the third variable, and then ran the analyses again. However, this time, while the overall heritability and environmental estimates make sense, the individual pathways for the third variable no longer add up. For example, the "e" pathways look like this:

15 e31 e 3 1 5.413679e-02 0.07613723
17 e32 e 3 2 -1.152992e-01 0.05596996
18 e33 e 3 3 -1.517046e-01 0.03867226

which, if I'm not mistaken, when calculated will give an overall e2 of .04. However, the overall heritability estimate gives me an overall e^2 of .94.

> mxEval(CholACE.e2, CholAceFit)
[,1] [,2] [,3]
[1,] 0.27192352 0.06743575 0.8606850
[2,] 0.06743575 0.44251383 0.9427354
[3,] 0.86068505 0.94273539 0.9416589

Furthermore, the a31, a32, a33 pathways as well as the c pathways of the same aren't adding up in terms of calculated h2 and c2 to a total of 1.00. Could anyone help me as to what exactly is causing this? At first I thought it might be something to do with the log values, but I played around with them, multiplied them by multiples of 10, and the values are still off.

I'm wondering if it is something to do with the code and how the pathways are calculated; I contemplated whether it was the data itself, but even if it was skewed, wouldn't the calculated h2, c2, and e2 from the individual pathway estimates still all add up to 1? And why would there be a discrepancy with the overall h2, c2, and e2 output?

If anyone could help me with this, it would be much appreciated. My code is attached. Thank you all!

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
'e' isn't standardized
For example, the "e" pathways look like this:

15 e31 e 3 1 5.413679e-02 0.07613723
17 e32 e 3 2 -1.152992e-01 0.05596996
18 e33 e 3 3 -1.517046e-01 0.03867226

which, if I'm not mistaken, when calculated will give an overall e2 of .04.

These are the path coefficients from your MxMatrix named 'e', right? Then you should expect the [3,3] element of MxMatrix 'E', not of 'e2', to be about 0.04. It may well be correct for the [3,3] element of 'e2' to be about 0.94, since 'e2' is 'E' element-wise divided by 'V'.

Do a2[3,3], c2[3,3], and e2[3,3] sum to 1?

Edit: sorry, I should have written h2[3,3] instead of a2[3,3].

Lux Whitehaven's picture
Offline
Joined: 02/02/2015 - 15:06
No, unfortunately. Here's the

No, unfortunately. Here's the full relevant output:

free parameters:
name matrix row col Estimate Std.Error
1 a11 a 1 1 8.025671e-01 0.16830304
2 a21 a 2 1 6.829409e-01 0.16438307
3 a31 a 3 1 -1.135809e-02 0.07866882
4 a22 a 2 2 -1.423489e-07 0.18995709
5 a32 a 3 2 -4.586746e-07 0.10463971
6 a33 a 3 3 -2.106173e-07 0.10357167
7 c11 c 1 1 2.850488e-01 0.40005257
8 c21 c 2 1 2.618797e-01 0.36618931
9 c31 c 3 1 4.797993e-02 0.08006657
10 c22 c 2 2 -1.872989e-07 0.18184398
11 c32 c 3 2 -2.746223e-07 0.12103150
12 c33 c 3 3 -4.117884e-07 0.11346927
13 e11 e 1 1 5.204916e-01 0.07839520
14 e21 e 2 1 8.651959e-02 0.11928019
15 e31 e 3 1 5.413679e-02 0.07613723
16 e22 e 2 2 -6.458876e-01 0.06477847
17 e32 e 3 2 -1.152992e-01 0.05596996
18 e33 e 3 3 -1.517046e-01 0.03867226

> mxEval(CholACE.h2, CholAceFit)
[,1] [,2] [,3]
[1,] 0.6465201 0.82077935 -0.278435567
[2,] 0.8207794 0.48602126 -0.092385549
[3,] -0.2784356 -0.09238555 0.003095895
> mxEval(CholACE.c2, CholAceFit)
[,1] [,2] [,3]
[1,] 0.08155638 0.11178490 0.41775052
[2,] 0.11178490 0.07146491 0.14965016
[3,] 0.41775052 0.14965016 0.05524525
> mxEval(CholACE.e2, CholAceFit)
[,1] [,2] [,3]
[1,] 0.27192352 0.06743575 0.8606850
[2,] 0.06743575 0.44251383 0.9427354
[3,] 0.86068505 0.94273539 0.9416589

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
?

It looks OK to me:
h2[3,3] = 0.003095895
c2[3,3] = 0.05524525
e2[3,3] = 0.9416589
0.003095895 + 0.05524525 + 0.9416589 = 1

The diagonal elements of 'h2', 'c2', and 'e2' are the standardized variance components (a.k.a. variance proportions) for the respective trait. So, for instance, about 94% of the variance in trait #3 is due to the nonshared environment.

BTW, you won't be able to square and sum path coefficients from the free parameters table and expect to get 1, since those path coefficients aren't standardized.

Lux Whitehaven's picture
Offline
Joined: 02/02/2015 - 15:06
Ah, I see! It was the free

Ah, I see! It was the free parameter table I was confused about. Thank you so much for the help!

Log in or register to post comments