OpenMx Help

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

myTwinData.txt?

Hi

I am new to OpenMx and thought that I would try things out by working through some of the examples.

Does anyone know where I can get the dataset myTwinData.txt that is used in some of them?

Thankyou

Karin

Posted on
Picture of user. carey Joined: 10/19/2009

* and %x% operators in mxAlgebra

anyone explain this?

> model2 <- mxModel(model1, mxAlgebra(.5*CTf, name="CTDZf"))
> model2 <- mxRun(model2)
Running SameMZDZf
Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings, :
BLAS/LAPACK routine 'DPOTRF' gave error code -4

> model2 <- mxModel(model1, mxAlgebra(.5 %x% CTf, name="CTDZf"))
> model2 <- mxRun(model2)
Running SameMZDZf
Warning message:
In model 'SameMZDZf' NPSOL returned a non-zero status code 1. blah blah ...

yet
> mat <- matrix(rnorm(16), 4)
> .5 * mat == .5 %x% mat
[,1] [,2] [,3] [,4]
[1,] TRUE TRUE TRUE TRUE

Posted on
No user picture. xlzqz Joined: 02/08/2011

Where can I download the source codes.

Does anybody know how can we download the source codes of OpenMx. Looks like no links to the source codes from the OpenMx Website.

Posted on
Picture of user. Lawrence L Lo Joined: 02/24/2010

Appending mxAlgebra expressions

Hello,

I am trying to generate mxAlgebra expressions from a size variable. I have a variable amount of mx submodels and am trying to add the objectives from these together for a full model objective. I have tried things like
mxAlgebra(sum(get(paste("submodel",1:x,".objective",sep=""))),
name="TotObj")
and other various methods. I also tried the method described on
http://openmx.psyc.virginia.edu/thread/537
but don't think this will help in my particular situation.
Any suggestions?

Best,
-LLL

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

No dataset associated with a model

Hi everybody!

It seems that OpenMx does not allow specifying a model without a dataset (see error message (1)). Sure, we will eventually need a dataset to run the model but at design time, I might not have a dataset yet. Only later in the program I might decide to load different datasets and associate them with the same model while at first the dataset reference could be NULL.
Shouldn't OpenMx allow NULL or some kind of empty dataset and test only within run() whether there is a valid dataset available?

Posted on
Picture of user. trinewa Joined: 11/30/2009

How do I add a demo script to an OpenMx directory?

Hi
I woulld like to share a demo script to the following directory:
http://openmx.psyc.virginia.edu/repoview/1/trunk/demo

The Wiki says where to put the file, but not technically how to add the file to the directory.
Any help?

Posted on
No user picture. Hermine Joined: 07/31/2009

Error in registerS3method

After sourcing the latest version of OpenMx on a Windows XP machine running R 2.9.2, we get the following error upon 'require(OpenMx):

require(OpenMx)
Loading required package: OpenMx
Error in registerS3method(Info[i, 1], Info[i, 2], Info[i, 3], env) :
no slot of name "methods" for this object of class "derivedDefaultMethod"
In addition: Warning message:
package 'OpenMx' was built under R version 2.11.0

Any suggestions on how to fix this?

Thanks,
Roseann & Hermine.

Posted on
Picture of user. carey Joined: 10/19/2009

@submodels slot

run:

MZf <- mxModel(name="MZf", mxData(ObsCovMZf, type="cov", numObs=nMZf),
mxMLObjective(covariance='myModel.PreCovMZf'))
DZf <- mxModel(name="DZf", mxData(ObsCovDZf, type="cov", numObs=nDZf),
mxMLObjective(covariance='myModel.PreCovDZf'))
myModel1 <- mxModel(name="myModel", MZf, DZf)
myModel1

then run and compare:

MZf <- mxModel(name="MZf", mxData(ObsCovMZf, type="cov", numObs=nMZf),
mxMLObjective(covariance='myModel.PreCovMZf'))
DZf <- mxModel(name="DZf", mxData(ObsCovDZf, type="cov", numObs=nDZf),

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

Error in Slot

Hi,

Some scripts which I'm sure have run without problems a couple of months ago are now giving me the following error:

> equateAEModelFit <- mxRun(equateAEModel)
Running equateAE
Error in slot(model, name) :
no slot of name ".newobjects" for this object of class "MxModel"

Any ideas what's happening?

Thanks,

Paul

Posted on
Picture of user. carey Joined: 10/19/2009

remove = TRUE issue

try the following code

VA <- mxMatrix(name="VA", type="Symm", nrow=5, ncol=5)
DZ <- mxAlgebra(.5 %x% VA, name="covDZA")
test <- mxModel(model="test", VA, DZ )
test
names(test)
rm1 <- mxModel(test, test@matrices$VA, remove=TRUE)
rm2 <- mxModel(test, test@algebras$covDZA, remove=TRUE)
rm3 <- mxModel(test, test@algebras$DZ, remove=TRUE)

why doesn't remove=TRUE work with rm1 and rm2 while it fails to throw an error or warning with rm3?