OpenMx General Help

Posted on
No user picture. Matifou Joined: 12/08/2009

Bug when latents contain a dot in name?

Hi

I don't know if this is the right place to post this question/remark...

I think there is a bug when one of the variables contain a "." While it is expressely forbidden for indicator variables:
Erreur : The name 'x1.1' is illegal because it contains the '.' character

it is not checked for the latents variables, leading to potential errors when using graphVIz ( See modified example below).

Simple workaround would be to add "" to all variables names when exporting to graphViz, this is only a guess but probably using something like: "\"graph@latentVars[[i]]\""

Example:

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

mysterious error

I get the following error, which is one of a series of virtually incomprehensible ones encountered trying to get this script to work.

Error in as.character(x) :
cannot coerce type 'closure' to vector of type 'character'

This problem is designed to fit a 2-class latent class model to binary data, using a mixture distribution.

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

Backing out of parameter space region where expected covariance is non-positive-definite

hi,
I think this model should run successfully.

# Fig2.12 from John Loehlin edition 4, p85
require(OpenMx)
# Get the data
names = c("A","C","D")
data=matrix(c(1, .3, .4, .3, 1, .35, .4, .35, 1), nrow=3, byrow=TRUE, dimnames=list(r=names, c=names))

# Get the manifest variable names from the data
manifests = row.names(data)
# Latents (in this case just B)
latents = c("B")

# Describe the model
model = mxModel("prob2-12", type="RAM",
manifestVars = manifests,
latentVars = latents,
mxPath(from = "A", to="B"), # factor loadings

Posted on
Picture of user. mjadams Joined: 10/13/2009

The F matrix in model...does not have column names

When I run the simple regression example with matrix specification i get

> uniRegFit <- mxRun(uniRegModel)
Running Simple Regression -- Matrix Specification
Error: The F matrix in model 'Simple Regression -- Matrix Specification' does not have column names.

I've set up some dummy data to feed into the model

x <- rnorm(40);
y <- 2* x + rnorm(length(x), sd=0.5);#
SimpleRegRaw <- data.frame(x, y)

Posted on
Picture of user. pdeboeck Joined: 08/04/2009

Expected covariance matrix is not positive-definite in row 0

Can anyone tell me about this error?

Error: The job for model 'LDE_Model_1' exited abnormally with the error message: Expected covariance matrix is not positive-definite in row 0.

Odd part: I ran the model more than once. This error came up with one data set, but not another. Seems like different observed data should not change the expected covariance matrix.

Posted on
Picture of user. pdeboeck Joined: 08/04/2009

OpenMx from 0.1.3-776 to 0.1.4-827, what changed?

Hi everyone,

Here's an interesting problem I am running into. I was working on improving convergence rates on a script that was giving me some problems. I finally got better convergence on my laptop after switching to FIML and changing the scaling of coefficients. (I think the variances of x and derivatives I was estimating were differing by several orders of magnitude.) Then it was time to get things working on Xgrid. After a while I noticed that one of my Xgrid computers (my desktop) was almost never converging, while my other computers were converging almost all the time.

Posted on
Picture of user. mkeller Joined: 08/04/2009

The OpenMx script in the tutorial does not work

Hi all,

I'm trying to run line-by-line through the tutorial under Documentation -> Quick-Start tutorial (1st page). The "More in-depth Example" does not work. (by the way, it would be helpful to have the tutorial be self-contained (i.e., no need for external data) so that anyone can actually run it. So simulation of twin data would be much more useful than calling up some old 'myTwinData.txt' file that can't be downloaded).

Anyway, I simulated my own twin data and tried running through the example. At the twinSatModel step, I run into problems:

> twinSatModel <- mxModel("twinSat",

Posted on
Picture of user. pdeboeck Joined: 08/04/2009

@output$status Codes

Hi --- I was just curious if there is documentation regarding the codes in @output$status. I've been looking at [[1]], and think I have figured out the values for Code Red (6) and Green (1), but now I'm also producing values of -1 and 4. I was also curious what the values in [[2]] and [[3]] tell me, and the associated codes.

Posted on
Picture of user. pdeboeck Joined: 08/04/2009

Using OpenMx with Xgrid

There seems to be a problem with how OpenMx and Xgrid interact. I have three machines on my Xgrid, each of which has no problem running OpenMx. After submitting jobs, the R scripts come back with the following errors:

> require(OpenMx)
Loading required package: OpenMx
Loading required package: snowfall
Loading required package: snow
Error in dirCreateStop(.sfOption$RESTDIR) :
UNABLE to create directory: /var/empty/.sfCluster/restore
In addition: Warning message:
In dir.create(dir, recursive = TRUE) :
cannot create dir '/var/empty/.sfCluster', reason 'Permission denied'