OpenMx General Help

Posted on
No user picture. manu Joined: 10/08/2009

another mxConstraint question

Dear all,

I have a large matrix (A), and I want to constrain certain submatrices within A to (let's say the product of) some smaller matrices. How can this be done in OpenMx?

I am looking for something like:

A <- mxMatrix("Full", 4, 4, labels = c("a","b",NA,NA,"c","d",NA,NA,NA,NA,"a","b",NA,NA,"c","d"), byrow = TRUE, free = TRUE, name = "AA")

B <- mxMatrix("Full", 2, 2, labels = c("w","x","y","z"), byrow = TRUE, free = TRUE, name = "BB")

C <- mxMatrix("Full", 2, 2, labels = c("w1","x1","y1","z1"), byrow = TRUE, free = TRUE, name = "CC")

mxConstraint(A[1:2,1:2] == B%*%C)

Posted on
No user picture. Janosch Joined: 05/10/2010

mxConstraint basics

Dear all,
I am trying to get a grip on the mxConstraint function. I played around with it a bit and encountered a strange thing. I fitted a model in which different parameters are constrained to be the same. When i specified this with the labels (i.e. both parameters are labeled "b11"), it worked fine.

Posted on
No user picture. manu Joined: 10/08/2009

mxConstraint

Dear all,
first of all, I love the new release - thank you so much!
However, when playing with the mxConstraint function, I encountered the following peculiar problem. When imposing the constraint
mxConstraint(varF1 == varF/(1-beta**2))
I get the error message:
In model 'FAwithin' NPSOL returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accuracy, and no improved point for the merit function could be found during the final linesearch (Mx status RED).

Posted on
No user picture. kitty_mimo Joined: 04/02/2010

Opening R files

Hi!

I'm having trouble opening my R files. When I double click on them, I get the error that the argument has been ignored and then R opens, but not my file. I can open my files directly from R but why can't I open them from elsewhere?

Thank you very much!

Posted on
No user picture. cgoldammer Joined: 04/07/2010

Overriding of the S matrix in path notation

Hi,

I have a problem with the path notation. There's two factors. Their errors are freely correlated. Also, the factors are linked. The problem is: the S matrix depends on the order of arguments for mxModel. In one notation, S is over-ridden.

I'd be happy about any suggestions! Regards, Chris

Here's the code:

latentVars=c("t1","t2")
path_error=mxPath(
from=latentVars,
arrows=2,
all=T,
free=T
)

path_factor=mxPath(
from=latentVars[1],
to=latentVars[2],
arrows=1,
free=T
)

Posted on
No user picture. pgseye Joined: 10/13/2009

Speed improvement using 64bit R?

Hi,

I came across this other topic about OpenMx in 64 bit R:

http://openmx.psyc.virginia.edu/thread/161

I've got both versions of R installed on OS X. I'm more curious than anything (and it will probably demonstrate my ignorance of what 64 bit computing enables one to do), but is there anything to be gained speed/computational time wise by running OpenMx in 64 bit mode (if I understand that it can be).

If so, I'm assuming it's not so straightforward to install (ie precompiled binary)?

Thanks,

Paul

Posted on
No user picture. pgseye Joined: 10/13/2009

mxEval

Hi,

I'm doing something wrong when trying to use mxEval to inspect values. Part of the bivariate script I'm running is below. It outputs estimates accordingly (only copied the first couple). But when I try mxEval after running the model, I get the starting value:

> mxEval(ACE.a[1,1],multiCholACEModel,T,T)
multiCholACEModel[["ACE.a"]]@values[1, 1, drop = FALSE]
[,1]
[1,] 0.5

Can someone tell me what I'm doing wrong?

Many thanks and Happy Easter to all.

Paul

name matrix row col Estimate Std.Error
1 a11 ACE.a 1 1 -31.296561 1.3084660

Posted on
Picture of user. Dorothy Bishop Joined: 02/04/2010

matrix not positive definite

Another very basic question, but it has been bugging me and i hope someone will answer so I can stop pondering this one.
So you run a model and get the message that your covariance matrix is not positive definite.
Why isn't the optimiser algorithm set up to avoid areas of the solution space where the eigenvalues are negative?

Posted on
Picture of user. Dorothy Bishop Joined: 02/04/2010

estimating covariance matrix for saturated multivariate ACE

This is an elementary nonurgent question but an answer would help me understand OpenMx better.
In trying to teach myself a bit more I have been playing around with a couple of multivariate ACE twin scripts. There's one by Hermine Maes that I downloaded from:

http://www.vipbg.vcu.edu/~vipbg/OpenMx/MultivariateTwin_MatrixRaw.R

and another I think by Steve Boker that is in the slides from
http://www.vipbg.vcu.edu/~vipbg/OpenMx/OpenMxSession8.pdf

They differ in how they specify covariance matrices for the saturated model:

The Maes script gives:

Posted on
Picture of user. Dorothy Bishop Joined: 02/04/2010

mxBounds

Apologies for an elementary question by a R novice:
I'd like to use mxBounds to set the lower bound of just the diagonal of a lower matrix, a, to zero.
Is there a way to do this which would work regardless of the dimensionality of a?

I tried
mxBounds(c('diag(a)'),0)

This did not give an error message, but it did not work either!