Fri, 10/12/2012 - 11:18

Sorry if this is a stupid question, but I have been having trouble getting to grips with OpenMx.

I have been using the sample script UnivariateTwinAnalysis_MatrixRawConACE.R. I would like to extend this in two ways:

* Print out a, c, and e (where appropriate) path variables and the standardized version of these for all models, (i.e. AE, CE, E not just ACE)

* Print out confidence intervals for ACE.A/ACE.V etc.

Can anybody help with this?

Thankyou

Karin

The documentation on mxCI is not too bad:

mxCI(reference, interval = 0.95, type=c("both", "lower", "upper"))

reference

A character vector of free parameters, mxMatrices, mxMatrix elements and mxAlgebras on which confidence intervals for free parameters are to be estimated, listed by name.

So once you have an algebra which computes ACE.A/ACE.V (say named stdA) you can request

mxCI(stdA)

Here std stands for standardized, not sexually transmitted disease :)

Access to the parameter estimates from a fitted model can be had in a couple of ways. One is

and another is via the summary

Yet another way is to use the wonderful function omxGetParameters. From ?omxGetParameters

omxGetParameters(model, indep = FALSE, free = c(TRUE, FALSE, NA),

fetch = c('values', 'free', 'lbound', 'ubound', 'all'))

Arguments

model

a MxModel object

indep

fetch parameters from independent submodels.

free

fetch either free parameters (TRUE), or fixed parameters or both types. Default value is TRUE.

fetch

which attribute of the parameters to fetch. Default choice is ‘values’.

I forgot to say: thanks for your helpful comments! I have gotten everything working now.

Kind regards

Karin