You are here

Multivariate ACE error message in binary data

2 posts / 0 new
Last post
romidico's picture
Offline
Joined: 01/09/2013 - 03:10
Multivariate ACE error message in binary data

Hi all,

I am trying to run multivariate ACE model for binary data, but I keep on getting error message...

This is my script:

require(OpenMx)

# ------------------------------------------------------------------------------
# PREPARE DATA

OMdataset # sep = ",", dec = ".", quote="\"", na.strings="-99"

OMdataset$TONSa -> OMdataset$T_01
OMdataset$TONSb -> OMdataset$T_02

OMdataset$ADENa -> OMdataset$A_01
OMdataset$ADENb -> OMdataset$A_02

OMdataset$GROMa -> OMdataset$G_01
OMdataset$GROMb -> OMdataset$G_02

# Set the Binary variable up for OpenMx
OMdataset$A_01 OMdataset$A_02 OMdataset$G_01 OMdataset$G_02 OMdataset$T_01 OMdataset$T_02 OMdataset$agea[OMdataset$agea==0] OMdataset$ageb[OMdataset$ageb==0] OMdataset$SEXa[ OMdataset$Zyg==6] OMdataset$agea OMdataset$ageb # Select Variables for Analysis
selVars defVars useVars 'SEXa','SEXb','agea','ageb')
# ------------------------------------------------------------------

# PREPARE MODEL
stThresh nv ntv # Sex and Age corrections
# Regression effects
beta1 values=.1, labels=c('betaSexA','betaSexG','betaSexT'), name="beta1" )
# Independent variables
obsSex labels=c("data.SEXa","data.SEXa","data.SEXa","data.SEXb","data.SEXb","data.SEXb" ), name="Sex")

#Means - fixed
mean thresholds labels=c("threshA","threshG","threshT"), name="threshold" )

expthresh

inclusions

# Select Data for Analysis
mzData

dzData =3, useVars)
# ------------------------------------------------------------------------------

# ACE Model
# Matrices declared to store a, c, and e Path Coefficients
pathA labels=c("a11","a21","a31","a22","a32","a33"), name="a" )
pathC labels=c("c11","c21","c31","c22","c32","c33"), name="c" )
pathE labels=c("e11","e21","e31","e22","e32","e33"), name="e" )

# Matrices generated to hold A, C, and E computed Variance Components
covA covC covE totalvariance

# Algebra for expected Variance/Covariance Matrices in MZ & DZ twins
covMZ cbind(A+C , A+C+E)), name="expCovMZ" )

covDZ cbind(0.5%x%A+C , A+C+E)), name="expCovDZ" )
one var1

# Data objects for Multiple Groups
dataMZ dataDZ

# Objective objects for Multiple Groups
objMZ objDZ

# Combine Groups
pars modelMZ modelDZ minus2ll obj CI AceModel

# ------------------------------------------------------------------------------
# RUN MODEL

# Run ACE model
AceFit try2 try2fit AceSumm AceSumm
round(AceFit@output$estimate,4)

When it gets to
# Run ACE model
AceFit

It takes ages to run, and at the end this is the error message I get:

Running ACE
Warning message:
In model 'ACE' 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)
> AceSumm Error: unexpected symbol in "AceSumm

I think it has something to do with threshold values, but I don't even know what threshold values to put...

Someone, plz help!!!!!!!

Thanks

Rob

neale's picture
Offline
Joined: 07/31/2009 - 15:14
Check Model Identification, and rerun

This example takes ages because there are 12 variables (6 per twin) and speedups such as grouping like observations for single evaluation don't help due to the use of definition variables. Using a cluster or multiple cores on a laptop/desktop system might help.

There has been much discussion of Code 6 - which may be a false alarm - on this site. Perhaps one of the clearest descriptions was by Ryne in this thread http://openmx.psyc.virginia.edu/thread/1659 A good strategy here is to rerun the script from different starting values, or simply to re-run from the solution:

AceFit2 <- mxRun(AceFit)

and see if the error code goes away.

The Error, unexpected symbol... is just an R error because the AceSumm should not be on the end of the line
AceSumm

Log in or register to post comments