OpenMx General Help

Posted on
Picture of user. psunthud Joined: 02/14/2012

Cannot run several examples with OpenMx 1.3.2

Hi all,

I install the OpenMx for windows today. I found that I cannot run several example scripts:

http://openmx.psyc.virginia.edu/svn/trunk/demo/BivariateSaturated_MatrixRawCholesky.R
http://openmx.psyc.virginia.edu/svn/trunk/demo/BivariateHeterogeneity_PathRaw.R

The error messages are

Error in mxModel("bivSat6", mxMatrix(type = "Full", nrow = 2, ncol = 2, :
could not find function "mxFitFunctionML"

Error in mxModel("bivariate Heterogeneity Path Specification", mxModel("group1", :
could not find function "mxFitFunctionAlgebra"

Posted on
Picture of user. iloo Joined: 05/26/2010

Aggregating covariate patterns

Hi fellow community members,

I'm working with quite large data sets ~500000 lines of 4-28 variables (number of covariate patterns >500). I'm trying to simplify the input data into OpenMx by aggregating covariate patterns so that I can specify one line per unique pattern, and then multiply the objective function by how many observations there are of the specific pattern. The reason for me to do this is that I want to save computing time.

Posted on
Picture of user. Mike Cheung Joined: 10/08/2009

Selecting submatrix within functions

I am writing some functions that need to select some submatrices with variable indices. Let's consider the following sample code. The issue is that mxModel() only recognizes x in the gobal environment rather than inside a function. Have I missed something? Thanks.

myFun <- function() {
x <- 2
cat("Matrix in R:\n")
A1 <- matrix(1:16, ncol=4, nrow=4)
B1 <- A1[1:x,1:x, drop=FALSE]
print(B1)
myModel <- mxModel("test",
A2 <- mxMatrix("Full", nrow=4, ncol=4, values=1:16, name="A2"),

Posted on
No user picture. m.bartels Joined: 12/18/2009

Problem with CIs (to close to point estimate)

Hi all,
Fitting tri-variate models with CIs but CIs look odd.
They are to close to the point estimate and lower point is sometimes higher that point estimate.
Below a selection

MZMmodel.sdAm[1,1] 3.224423e-01 0.32244499 0.39122315
MZMmodel.sdAm[1,2] 4.477139e-01 0.58554106 0.58555366
MZMmodel.sdAm[1,3] 8.285475e-01 0.82850806 0.82855803
MZMmodel.sdAm[2,1] 4.477139e-01 0.58554106 0.58555366
MZMmodel.sdAm[2,2] 4.104425e-01 0.41044353 0.41043733
MZMmodel.sdAm[2,3] 4.554080e-01 0.45540625 0.61216648
MZMmodel.sdAm[3,1] 8.285475e-01 0.82850806 0.82855803

Posted on
Picture of user. Charlotte Joined: 07/02/2012

CIs vs. fit statistics

Hi,

I've calculated genetic and environmental cross-trait correlations in a bivariate model, based on the correlational approach for scalar and non-scalar sex limitations (Neale et al., 2006, Twin Research and Human Genetics).

I've tested their significance by looking at the CIs and by checking what happens when I drop each parameter.

Now I have the situation where zero lies within the CIs - but when I drop the parameter, the model changes significantly. How is that possible (--> output attached!)?
(For a different phenotype, this didn't happen.)

Posted on
Picture of user. jjheath Joined: 08/26/2012

Inflated disturbance estimate

I have a complex nonrecursive path model (i.e., only latent disturbance terms for endogenous manifests). It has several reciprocal paths and potential feedback loops. The model converges fine with no errors and the fit statistics all look great (X2 = 9.2, P = 0.24, CFI = 0.99, RMSEA = 0.033) and all the correlation residuals are less than 0.10. However, one of the disturbance estimates is slightly higher than the manifest variables actual variance (d = 1.699, s2 = 1.605), which creates a slightly negative R2 value for that endogenous variable.
Posted on
Picture of user. Julia Joined: 03/29/2012

Exctract CI values

Hi.
Is it possible to extract values of upper and lower bounds of CI separately? Let's say I would like to estimate CI's for path estimates for males by introducing the following command:

ciVm = mxCI(c('am','cm','em'))

The only thing I am able to get is:

> QualACEFit@output$confidenceIntervals
lbound ubound
MZM.am[1,1] 6.128870 10.699917
MZM.cm[1,1] -7.901978 7.901978
MZM.em[1,1] 3.775610 5.115599

What I am interested in is to get, e.g., a value for the lower boud of CI for am. Is that feasible somehow?

Posted on
No user picture. Rene Mayer Joined: 09/17/2012

clustered/multilevel sampling

Dear all,
I have data from a survey, e.g, several Items answered by pupils within several schools. And further I want to confirm that there are 4 latent with assumed loadings on the Items (CFA assuming a normal distribution). Is it possible to analyze this multilevel structure (school/pupil) with OpenMx (some way to get a Mplus-like handling 'Type=complex cluster=school')?
Thanks in advance,
René
Posted on
Picture of user. sbremer Joined: 11/08/2011

Estimation of RAM-model

Sorry for the beginner's question...
But please help me understand: When I specify a path like

mxPath(
from=latents, # names of latent variables
arrows=2,
connect='single',
free=T,
values=NA,
labels=('lab1','lab2','lab3')
)

and run a model (RAM) with this and other path for the indicators with mxRun(), are 'lab1', 'lab2', 'lab3' the estimates of variances of the latent variables or are they estimates of variances of the latent disturbance?

Thanks in advance!!

Posted on
Picture of user. sbremer Joined: 11/08/2011

lbound for variances

Hello again :)

I need some assistance:
When running my model (factor analysis with four indicators) with mxRun() I get a negative residual variance. So I used lbound = 0 for the estimate of this variance. The output gives me 0 for the estimate. I wonder whether OpenMx really estimates there or does it try to estimate in the direction of the old, negative estimate and stop at the lower bound of 0.

If this is not detailed enough I could provide my script and full output.

Thanks in advance!
Sophia