OpenMx General Help

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

mxExpectationGREML error

Why does this give an error when the code is taken directly from the documentation to mxExpectationGREML?

> require(OpenMx)
> mxVersion()
OpenMx version: 2.0.1.4157
R version: R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin10.8.0
Default optimiser: NPSOL
> # the following are the first three commands from the Examples from
> # the documentation to mxExpectationGREML
> dat <- cbind(rnorm(100),rep(1,100))
> colnames(dat) <- c("y","x")
>
> ge <- mxExpectationGREML(V="V",yvars="y",Xvars=list("X"),addOnes=FALSE)

Posted on
No user picture. CM Joined: 05/12/2015

speed issue with mxRun

Dear All,

I am writing on behalf of a user of our local cluster.

The OpenMX install is fairly recent (just with source('http://openmx.psyc.virginia.edu/getOpenMx.R' in R). The script in question is rather long and starts with loading OpenMX:

require(OpenMx)

and subsequently snowfall:

library(snowfall)
sfInit(parallel = T, cpus = 64)
sfLibrary(OpenMx)

Posted on
No user picture. jacobucc Joined: 05/27/2014

Specifying Unique mxFitFunction

Hi,
I am new to 2.0 and am playing around with specifying a non-standard fit function, and have hit some road bumps in trying to start with specifying the ML fit through mxFitFunctionAlgebra. Attached is the reproducible script. Error message is:

Error: The job for model 'One Factor' exited abnormally with the error message: MxComputeGradientDescent: fitfunction One Factor.fitfunction is not finite ()

If mxFitFunctionAlgebra() is used, does it have to include a gradient specification?

Posted on
No user picture. Lux Whitehaven Joined: 02/02/2015

Restricted Model Cholesky; how to drop/fix parameters?

Hello everyone,

I'm a graduate student currently learning OpenMX, and I am unfortunately still a novice at OpenMX and genetic modeling in general. I've so far successfully run multivariate Cholesky analyses with OpenMX in R studio, and gotten interpretable data.

However, I am now trying to drop parameters on my current Cholesky model, to get a "best fit" reduced model for my data. I am having trouble understanding how I might do this; I understand it would involve fixing certain parameters at zero, but given my code, I am completely at a loss as to how I might go about this.

Posted on
No user picture. hiliang Joined: 11/17/2014

OpenMx performance on CentOS server

I just run the demo script of the package and I don't modify the script.

when I run the demo script AlternativeApproaches.R on my computer, the running cpu is around 100% and completed in 10 seconds.
input:
time Rscript AlternativeApproaches.R
output:
real 0m2.431s
user 0m3.752s
sys 0m0.093s

But when I run the script on my company CentOS server, the running cpu is above 500% and completed in more than 15 minutes.
input:
time Rscript AlternativeApproaches.R
output:
real 2m39.438s
user 15m6.753s
sys 0m2.392s

Posted on
No user picture. HYOSHIN Joined: 02/23/2015

SEM, Binary and Categorical Data in independent variables

Dear all, Please help me fixing this problem.

The data set has (please see example diagram)
+ 3 continuous variables(X1, X2, X3) for a latent variable (intercept)
+ 3 mediators (one binary X8 and two categorical variables X6, X7)
+ 1 dependent variable (X4).

This coding was based on the post about Categorical Data in both independent and dependent variables http://openmx.psyc.virginia.edu/thread/3883

When I run SEM.R model I have following error message.

Error in mxRAMObjective(A = "A", S = "S", M = "M", thresholds = "Threshold") :

Posted on
No user picture. janneadolf Joined: 02/06/2015

Access Kalman filter generated process state estimates online (mxExpectationStateSpace)

I am using the Kalman filter implementation (mxExpectationStateSpace) to fit a time-discrete vector auto-regressive model to single subjects' multivariate time series. If I'm not mistaken, the Kalman filter generates (predicted and updated) process state estimates for each but the first time point. Is it possible to pull these state estimates out online while the data are being filtered?
Posted on
Picture of user. wuhao_osu Joined: 09/07/2010

Background of data set in OpenMx

I can see several twin data sets that come with OpenMx, for example, the DZO data described by following page:

http://openmx.psyc.virginia.edu/docs/OpenMx/latest/_static/Rdoc/dzoData.html

Would anyone please provide more background about this data? The sample size seems to indicate that it is not simulated data, but no descriptions are given for the variables.

I would appreciate it. Thanks.

Posted on
No user picture. CharlesD Joined: 04/30/2013

Problem with definition variables with state space expectation?

Am I doing something wrong? I was surprised when my model seemed to be ignoring my definition variables, but then I also notice that mxEval interprets them all as NA... this is using a build from yesterday, 1st Feb 2015, on 64 bit windows.

data(demoOneFactor)
nvar <- ncol(demoOneFactor)
varnames <- colnames(demoOneFactor)
demoOneFactorInputs <- cbind(demoOneFactor, V1=rnorm(nrow(demoOneFactor)))
ssModel <- mxModel(model="State Space Inputs Manual Example",
mxMatrix("Full", 1, 1, TRUE, .3, name="A"),
mxMatrix("Full", 1, 1, TRUE, values=1, name="B"),

Posted on
No user picture. ywyh Joined: 09/25/2014

identifying bivariate outliers

Hi,

I am trying to detect and identify bivariate outliers in a dataset using OpenMx, in order to see whether specific outliers have significant contribution. Preferrably the output would be like that of %p in old Mx.
(i.e. 8 columns with:
1) -2lnL,
2) Mahalanobis,
3) estimated Z,
4) number of observations in data set,
5) number of data points in vector,
6) optimization details,
7) whether or not likelihood was calculable, and
8) model number if there are multiple models)