Attachment  Size 

Test Data ACE Model.csv  964 bytes 
ACE Skript tested with own Data.R  6.16 KB 
Hey guys. I am trying to do an ACE Model with my own twin data for my master thesis.
So far I had not a lot to do with statistics and also the Program R was new for me, so I spent a lot of time to get into the topic.
As basic skript I used http://openmx.psyc.virginia.edu/docs/OpenMx/2.6.7/GeneticEpi_Matrix.html
I have some questions for you and hope someone can help me with them.

I tested the skript with the standard twinData set and tried to achieve the same output as they did in the paper: Estimating Heritability from Twin Studies (from Karin Verweij). I was able to reconstruct the same results expect the c^2 value was different. Could someone tell me how to get the correct c^2 value (compare skript)?

In the attachment you will find a file with some variables from my twin study. How do I determine the starting values? Can I use the Falconer's formula to set the start values?
PS: Skript and dataset are attached! Duration 1 stands for sleep duration in twin 1 and duration 2 for the sleep duration twin 2.
I would be greatful for your help.
Best
Andrea
How different is the c² value from what's in the paper? Also, which version of OpenMx are you running? The paper you reference looks to be from 2011, so its authors would have been using OpenMx v1.x. If you're running v2.2 or newer, then the default optimizer would be different from what it was in v1.x. If you installed OpenMx from our website (and not from CRAN), you can switch to the old optimizer by adding
to your script at some point after loading OpenMx. Also, does the paper say what operating system and CPU its authors used? It's possible to get somewhat different results if you're not using the same platform as they (although NPSOL behaves quite consistently across platforms). If you think that the optimizer is stopping at a local minimum, you can try replacing
mxRun()
withmxTryHard()
in your script.The start values just need to be reasonable. Since the free parameters in your case are the square roots of the biometric variance components, the square root of the phenotypic variance divided by 3 should be reasonable. You could also use Falconerstyle start values calculated from the MZ and DZ covariances. If finding good start values is an issue (I don't think it will be), you could try replacing
mxRun()
withmxTryHard()
in your script.Edit: you might also be interested in the
umxACE()
function from the 'umx' package.First of all, thank you very much for your response. Nobody from our institute worked before with ACE Models and openMx so I was kind of lost.
The c² is 2.332136e^14 instead of 4.377829 e^14. I installed OpenMx now from our website and add the recommended optimizer code after the require(OpenMx) command. Funny enough I get know the value 7.337437e^12 for c². And also the numbers for the estimated a11, c11 and e11 have the wrong sign ;( But I don't think it is to important because for my results I only have to make a table with 2LL, df, AIC, A, C and E values (and therefore I read it is common to use the standardized ones). They say nothing about the platform they used.
I somehow don't understand how it doesn't really matter which starting values I choose (they just need to be reasonable).
Is it okey if I choose for svPa < 0.422 (Falconerstyle start)? What about svMe? Could you make an example with my data how you would make it? (Sorry it is hard to understand for me, I am quite new (2 month) in this field)
I am working on a data set with 10 DZ and 15 MZ twin pairs. I measured 8 different parameters for sleep. Is it right if I do for each parameter a different ACE,CE,AE model (choosing the best according to AIC value) or am I barking up the wrong tree?
(Sorry may a stupid question, but my social enviroment only gave me the data and are not able to help me with the analysis)
That discrepancy in c² values is too small to be of concern. All three of those values are basically zero [edit: I think? Should 7.337437e^12 actually be 7.337437e^12?] Also, the path coefficients labeled "a11", "c11", and "e11" are square roots of the corresponding variance components, so their sign is immaterial.
The optimizer is trying to find values of the free parameters that minimize the fitfunction, 2logL (equivalent to maximizing the likelihood). It has to start its search someplace, namely, at the start values we give it. Giving it reasonable start values helps it find a minimum (i.e, a solution) more quickly., and make it more likely that the minimum it finds is the global minimum, out of the whole parameter space. It's possible (depending on the difficulty of the optimization problem) for the optimizer to reach the same minimum from different sets of reasonable start values. By "reasonable" start values, we mean start values that are somewhat close to the free parameter values at the solution, that satisfy all explicit and implicit constraints on the optimization problem, and which do not create numerical difficulties for the optimizer. You might be interested in some relevant presentations from an OpenMx workshop, here and here.
I can't even get as far as the descriptive statistics in your script without making some changes. See below:
Ordinarily I'd recommend doing a multitrait analysis of all 8 phenotypes, but your sample size is so small that the approach you suggest heredoing 8 separate monophenotype analysesis probably best in your case.
Also, unless your twins are all the same sex and have minimal variation in age, you're going to want to adjust for age and sex in your model's means.
Thanks Rob for your excellent explications, you are great.
The small data set was as the reason I was thinking about doing 8 separate monphenotype analyses. The focus on our study was the duration of measurement (6 months of measured nights by actigraphy). I also planned to do the ACE analysis separate for weekends and weekdays (to see if genetic effects on the parameters are more domiant during weekends). As I mentioned before I am the first person from our Institute working with SEM. I don't have really a contact person I can discuss the best steps with. Do you think my considerations regarding comparing monphenotype ACE for weekend and weekdays make sense?
All the twins were between 12.25 and 16.5 years old and as well different genders. It seems that I have to adjust for age and sex as well.
I really appreciate your help!