Problem creating saturated output from script: MultivariateTwinAnalysis_MatrixRaw.R

Posted on
Picture of user. trinewa Joined: 11/30/2009

I am running the script: MultivariateTwinAnalysis_MatrixRaw.R from the TC24 homepage, on my own data.
I don't seem to be able to create any saturated output from the following commands, although the multiTwinSatFit is not empty:
parameterSpecifications(multiTwinSatFit)
expectedMeansCovariances(multiTwinSatFit)
tableFitStatistics(multiTwinSatFit)

I get the following error messages:
Error: could not find function "parameterSpecifications"
Error: could not find function "expectedMeansCovariances"
Error: could not find function "tableFitStatistics"

I am just beginning to learn to run twin analyyses through OpenMx - very happy if anyone could tell me what I am doing wrong.

Replied on Tue, 02/23/2010 - 10:03
Picture of user. mspiegel Joined: Jul 31, 2009

I think you need to source the Genetic Epi Helper Functions: http://www.vipbg.vcu.edu/~vipbg/Tc24/GenEpiHelperFunctions.R. The link is at the bottom right of the TC24 homepage. But I admit there's no instructions that you need to include this file.

Replied on Wed, 03/03/2010 - 08:36
Picture of user. trinewa Joined: Nov 30, 2009

In reply to by mspiegel

Thank you, that helped!
One more question concerning this script:
The parts of the script that concern fitting the multivariate saturated model, and fitting multivariate model with equal means & variances across twin order and zygosity, fail when running the script on my data.

In the first I get the following error message:
Running multiTwinSat
Error in FUN(X[[3L]], ...) :
Could not find function with name : and 2 arguments,
and in the second the error message is tha object "uniTwinSatFit" cannot be found.

I have edited the script by setting correct starting values. Are there any other adaptations that need to be made in order to run the script on my own data?

Replied on Thu, 03/04/2010 - 04:41
Picture of user. trinewa Joined: Nov 30, 2009

In reply to by mspiegel

Thanks once again for useful help! Ugrading OpenMx fixed the first problem. However, I discovered an error in the example script, in that it calls for a non-existing object uniTwinSatFit that needs to be changed to multiTwinSatFit.