OpenMx Help

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

Freely estimate genetic correlation DOS twins

Hi,

I'm adapting the BIVARIATE Boulder-skript atm and I'm trying to freely estimate the paths connecting the As of the two phenotypes for the DOS-twins. So it should be 0.5 for the DZ twins, but freely estimated for the DOS twins.

With this skrip, I get ONE estimate for both paths:

pathRados <- mxMatrix (type="Full", nrow=1, ncol=1, free=TRUE, values=0.5, label="rados", lbound=-1, ubound=1, name="ra")

expCovDOS <- mxAlgebra(name = "expCovDOS",
expression = rbind (cbind(Am+Cm+Em, (ra%x%(am%*%t(af)))+cm%*%t(cf)),

Posted on
Picture of user. rabil Joined: 01/14/2010

Constraining Thresholds

I wrote a simple OpenMx script to do LCA on ordinal variables. It works fine on simulated data. When I run it on real data, the estimated thresholds are not in order. I then included constraints on the thresholds (simple enough to do) so that they are monotonically increasing. This seems to work as the threshold estimates monotonically increase. From reading the manual, I was sure constraints weren't necessary.

Posted on
No user picture. Karin Joined: 02/11/2011

Errors in UnivariateTwinSaturated_MatrixRawCon.R

I am just starting out in OpenMx and am trying to run the demonstration script UnivariateTwinSaturated_MatrixRawCon.R I get the error messages below.

Can anybody help?

Thankyou

Karin

> # Fit Model with Equal Means & Variances across Twin Order and Zygosity
> # -----------------------------------------------------------------------
> # Constrain expected means and variances to be equal across twin order
> equateMeansVarsTwinModel <- mxModel(univTwinSatFit, name="equateMeansVarsTwin",
+ mxConstraint( alg1="MZ.expVarMZt1", "=", alg2="MZ.expVarMZt2", name="VarMZt1ist2"),

Posted on
Picture of user. rabil Joined: 01/14/2010

Poisson Counts

I've asked about this before but I don't think I ever received any replies. Can OpenMx handle Poisson counts as observed variables? I have counts that are too small to treat as continuous Normally distributed outcomes and I need a way to model them. Any insights would be greatly appreciated.

Posted on
Picture of user. rabil Joined: 01/14/2010

Is it possible to model censored data in OpenMx?

The data I have are censored at a value that is constant across all subjects. So y is Normal except that all values at or above 15 were coded as 15. I've created a simple LCA in OpenMx that works (treats the censored data as if it were simply Normal) but the censored data affect the detection of clusters. I'd like to model the data as truncated. I'm familiar with thresholds for ordinal data but it's not clear to me if OpenMx can handle truncated Normal data where y* = y if y <= 15 and y* = 15 if y > 15.

Posted on
No user picture. HAMED Joined: 06/15/2012

Error in runHelper: "Requested improper value (#, #) from (#, #) matrix".

Hello,

I'm using metaSEM package developed using OpenMx for conducting meta-analytical structural equation modeling (http://courses.nus.edu.sg/course/psycwlm/Internet/). When applying the mxModel (through tssem1RE function in metaSEM) to my data, I receive a message about an error in runHelper saying that "Requested improper value (5, 41) from (4, 702) matrix" and the function is terminated! I have attached a snapshot of the error message.

Posted on
No user picture. userzht Joined: 02/19/2011

non-zero status code 1

Hi, all

I was going to make a multivariate ACE model. But I got this warning when fit saturated model.

In model 'Phenotypic_Cholesky' NPSOL returned a non-zero status code 1. The final iterate satisfies the optimality conditions to the accuracy requested, but the sequence of iterates has not yet converged. NPSOL was terminated because no further improvement could be made in the merit function (Mx status GREEN).

What should I do with error like this?

Thanks in advance!
Ting

Posted on
Picture of user. rabil Joined: 01/14/2010

Upper and lower bounds of confidence interval equal the parameter estimate

I've written a simple latent class model (simplified the OpenMx example code for the growth mixture model). I've run it with 1,000 random starts using the approach shown in the docs and I get the maximum likelihood estimates. When I use the same starting values that were used for the smallest -2LL (which has a status code of 0), I get the same estimates but when I request confidence interals, the upper and lower bounds equal the estimates. Usually, when I run various OpenMx models, I have few problems estimating the CI's.

Posted on
No user picture. Docherty Joined: 02/20/2012

heritability estimates for unequal family sizes in R

I'm working with pedigrees where one family member has schizophrenia and all family members share 1/2 DNA. The program SOLAR seems to use a separate matrix for mother and father id when samples have families of varying sizes. Does anyone know of sample R/OpenMx syntax for this? I have a smaller sample and want to use all family data possible, but my first-degree family members are unequal--it would be nice to eyeball what matrices look like in this type of analysis.

Posted on
Picture of user. neale Joined: 07/31/2009

Standardized Estimates

At a recent workshop, someone asked how to obtain standardized estimates from OpenMx. Using the path-style input this is straightforward, and can be done with a couple of mxEval() statements and an omxRAMtoML() call:


# Now standardize solution
mxEval((solve(vec2diag(sqrt(diag(S)))))%&%S,threeLatentMultipleReg1Out)
mlthreeLatentMultipleReg1Out<-omxRAMtoML(threeLatentMultipleReg1Out)
mxEval(solve(vec2diag(sqrt(diag(solve(I-A)%&%S))))%*%A%*%vec2diag(sqrt(diag(solve(I-A)%&%S))),mlthreeLatentMultipleReg1Out,compute=T)