Attachment | Size |
---|---|

MultivariateTwinAnalysis_AL.R [6] | 10.83 KB |

AxialLength.txt [7] | 12.24 KB |

Hi Everyone,

I'm still rather green with all of this, but am learning a lot. I've tried to adapt a script to work with right and left eye data for the simple case of a single variable (axial length of the eye) and was wondering if someone would be kind enough to run it and comment on what I've done.

I've attached the script and the data (change .txt to .RData - it'd be nice if we could upload RData files directly).

There are 4 main queries which I've marked in the text with a ? in large lettering, so hopefully it'll be easy to find.

1. At the end of the twin order and zygosity constraint statements, I've added two for equating R and L data. I get a p value of 0 - so I can't assume equal means across R and L, right? I find this surprising, because if I run it as it originally was (across twin order and zygosity), I get a p value of 0.28. Maybe I've done something wrong here?

2. The main thrust of this is to use data from both eyes in the heritability estimation (cholesky decomposition), so here I've written algebras so that I can later set equality constraints on elements of the A and E matrices. Is this sound?

Running the models gives me a satisfactory fit with an AE model (p 0.68).

3. I've written a model to equate R and L additive and environmental elements and compared this to the saturated model.I get equal path coefficients, but a p value of 0.01, so again seems a poor fit (if I've done this right).

name matrix row col Estimate Std.Error

1 a11 ACE.a 1 1 0.79730983 2.121996e-314

2 a21 ACE.a 2 1 0.79730983 6.365987e-314

3 a22 ACE.a 2 2 -0.09772423 NaN

4 e11 ACE.e 1 1 0.31841590 NaN

5 e21 ACE.e 2 1 0.31841590 NaN

6 e22 ACE.e 2 2 -0.27562709 1.060998e-313

7 ACE.Mean 1 1 23.18632658 NaN

8 ACE.Mean 1 2 23.14464328 NaN

4. Trying to run the format output function on this, gives me errors, so I'm unsure how to convert the path coefficient to a variance component.

I'd be extremely grateful for any help. Support in my department is rather thin and so these forums are a main source of assistance for me.

Thanks in advance.

Paul