You are here

Problem creating saturated output from script: MultivariateTwinAnalysis_MatrixRaw.R

5 posts / 0 new
Last post
trinewa's picture
Offline
Joined: 11/30/2009 - 06:35
Problem creating saturated output from script: MultivariateTwinAnalysis_MatrixRaw.R

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.

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
I think you need to source

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.

trinewa's picture
Offline
Joined: 11/30/2009 - 06:35
Thank you, that helped! One

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?

mspiegel's picture
Offline
Joined: 07/31/2009 - 15:24
I think upgrading to the

I think upgrading to the latest version of OpenMx will make the first error go away. The ":" operator for matrix selection was implemented in the past month.

trinewa's picture
Offline
Joined: 11/30/2009 - 06:35
Thanks once again for useful

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.