OpenMx Error Messages
http://openmx.psyc.virginia.edu/taxonomy/term/36/0
enPlease read before posting: Help us help you!
http://openmx.psyc.virginia.edu/thread/3925
<p>If you are posting to ask for help with an error message, we ask that your post include, at minimum, the following:</p>
<ol type=1>
<li>The actual text of the error message.
</li><li>The version of <i>OpenMx</i> you're running (enter <span class="geshifilter"><code class="rsplus geshifilter-rsplus">mxVersion<span style="color: #080;">(</span><span style="color: #080;">)</span></code></span> at the R prompt).
</li><li>The version of R you're running.
</li><li>Your operating system and architecture (e.g., "x86_64 Linux").
</li><li><i>OpenMx</i>'s default optimizer (which will always be NPSOL for <i>OpenMx</i> versions 1.4 or older).
</li></ol>
<p>Note that if you're using <i>OpenMx</i> version 2 or newer, you can see items #2 thru #5 above with <span class="geshifilter"><code class="rsplus geshifilter-rsplus">mxVersion<span style="color: #080;">(</span><span style="color: #080;">)</span></code></span>.</p>
<p>Additionally, please understand that it is very difficult for anyone to help you out if you don't provide the R syntax that produced the error message. So, please consider attaching your script to your post. If you don't want to share your script, consider preparing a minimal script that produces the same error message in a similar way.</p>
<p>Finally, it would be ideal if you could share the dataset you're using with your script, but of course that is not always possible.</p>
http://openmx.psyc.virginia.edu/thread/3925#commentsOpenMx Error MessagesWed, 05 Nov 2014 16:12:39 +0000AdminRobK3925 at http://openmx.psyc.virginia.eduGeneral strategies
http://openmx.psyc.virginia.edu/thread/325
<ol>
<li>Use the traceback() function in R after an error occurs.<br />
It will print out the sequence of function calls that lead to the error.</li>
<li>Simplify your code. This may help you locate an error more easily. For example, replace the following:<br />
<div class="geshifilter"><pre class="rsplus geshifilter-rsplus" style="font-family:monospace;">foo <span style="color: #080;"><-</span> mxModel<span style="color: #080;">(</span>mxMatrix<span style="color: #080;">(</span><span style="color: #ff0000;">'Full'</span>, <span style="color: #ff0000;">1</span>, <span style="color: #ff0000;">2</span>, name <span style="color: #080;">=</span> <span style="color: #ff0000;">'a'</span><span style="color: #080;">)</span>,
mxAlgebra<span style="color: #080;">(</span>a <span style="color: #080;">+</span> a, <span style="color: #ff0000;">'b'</span><span style="color: #080;">)</span>, mxAlgebraObjective<span style="color: #080;">(</span><span style="color: #ff0000;">'b'</span><span style="color: #080;">)</span><span style="color: #080;">)</span></pre></div><br />
with:<br />
<div class="geshifilter"><pre class="rsplus geshifilter-rsplus" style="font-family:monospace;">aMatrix <span style="color: #080;"><-</span> mxMatrix<span style="color: #080;">(</span><span style="color: #ff0000;">'Full'</span>, <span style="color: #ff0000;">1</span>, <span style="color: #ff0000;">2</span>, name <span style="color: #080;">=</span> <span style="color: #ff0000;">'a'</span><span style="color: #080;">)</span>
bAlgebra <span style="color: #080;"><-</span> mxAlgebra<span style="color: #080;">(</span>a <span style="color: #080;">+</span> a, name <span style="color: #080;">=</span> <span style="color: #ff0000;">'b'</span><span style="color: #080;">)</span>
objective <span style="color: #080;"><-</span> mxAlgebraObjective<span style="color: #080;">(</span><span style="color: #ff0000;">'b'</span><span style="color: #080;">)</span>
model <span style="color: #080;"><-</span> mxModel<span style="color: #080;">(</span>aMatrix, bAlgebra, objective<span style="color: #080;">)</span></pre></div>
</li>
</ol>
http://openmx.psyc.virginia.edu/thread/325#commentsOpenMx Error MessagesSat, 09 Jan 2010 18:35:41 +0000mspiegel325 at http://openmx.psyc.virginia.eduPermutations Analysis non-zero status code 6 warning
http://openmx.psyc.virginia.edu/thread/4025
<p>Hello,</p>
<p>I have completed a standard ACE model of a phenotype with no errors. I now want to permute the zygosity labels of the twins and perform 10,000 permutations of the ACE model. I will then use this distribution of permitted A estimates to estimate the significance of my observed A.</p>
<p>When I run the analysis with the observed data I receive no warnings. However, when I run the permutations I usually receive about 20 of the warnings shown at the bottom of this message. Based upon the info in this forum <a href="http://openmx.psyc.virginia.edu/thread/754" title="http://openmx.psyc.virginia.edu/thread/754">http://openmx.psyc.virginia.edu/thread/754</a> it seems like this error is most likely from when the permutations are operating on the extremes of the model and are safe to ignore.</p>
<p>However, I am not sure how to confirm this is the case with so many models to work with.</p>
<p>Thanks!</p>
<p>Brittany</p>
<p>In model 'ACE' Optimizer 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)</p>
http://openmx.psyc.virginia.edu/thread/4025#commentsOpenMx Error MessagesWed, 12 Aug 2015 18:44:08 +0000britt014025 at http://openmx.psyc.virginia.eduBivariate Cholesky model for combined continuous and bivariate variables adjusted for age-Error message for ACE
http://openmx.psyc.virginia.edu/thread/4006
<p>I am using a bivariate cholesky model for combined continuous and bivariate variables (bw) with Age effects on thresholds.</p>
<p>I am stuck with the error message in running model 'CholAce':A definition variable has been declared in model 'ACE' that does not contain a data set.</p>
<p>The code:<br />
#--------------------------------------------------------------------<br />
CholAceModel <- mxModel("CholAce",<br />
mxModel("ACE",<br />
mxMatrix( type="Lower", nrow=nv, ncol=nv, free=TRUE,values=svPa, labels=labLower("a",nv),<br />
lbound=lbPa, name="a"),<br />
mxMatrix( type="Lower", nrow=nv, ncol=nv, free=TRUE,<br />
values=svPa, labels=labLower("c",nv), lbound=lbPa, name="c" ),<br />
mxMatrix( type="Lower", nrow=nv, ncol=nv, free=TRUE,<br />
values=svPa, labels=labLower("e",nv), lbound=lbPa, name="e"),<br />
# Matrices A, C, and E compute variance components<br />
mxAlgebra( expression=a %*% t(a), name="A" ),<br />
mxAlgebra( expression=c %*% t(c), name="C" ),<br />
mxAlgebra( expression=e %*% t(e), name="E" ),<br />
# Algebra to compute total variances and standard deviations (diagonal only)<br />
mxAlgebra( expression=A+C+E, name="V" ),<br />
mxMatrix( type="Iden", nrow=nv, ncol=nv, name="I"),<br />
mxAlgebra( solve(sqrt(I*V)), name="iSD"),</p>
<p> mxAlgebra(ACE.iSD %*% ACE.a,name="sta"),<br />
mxAlgebra(ACE.iSD %*% ACE.c,name="stc"),<br />
mxAlgebra(ACE.iSD %*% ACE.e,name="ste"),</p>
<p> mxAlgebra(ACE.A/ACE.V,name="h2"),<br />
mxAlgebra(ACE.C/ACE.V,name="c2"),<br />
mxAlgebra(ACE.E/ACE.V,name="e2"),</p>
<p> mxAlgebra(solve(sqrt(ACE.I*ACE.A)) %*% ACE.A %*% solve(sqrt(ACE.I*ACE.A)),name="ra"),<br />
mxAlgebra(solve(sqrt(ACE.I*ACE.C)) %*% ACE.C %*% solve(sqrt(ACE.I*ACE.C)),name="rc"),<br />
mxAlgebra(solve(sqrt(ACE.I*ACE.E)) %*% ACE.E %*% solve(sqrt(ACE.I*ACE.E)),name="re"),</p>
<p> # Define definition variables to hold the Covariates<br />
mxMatrix( type="Full", nrow=1, ncol=1, free=F, labels=c("data.age1"), name="Age1"),<br />
mxMatrix( type="Full", nrow=1, ncol=1, free=F, labels=c("data.age2"), name="Age2"),<br />
mxMatrix( type="Zero", nrow=1, ncol=ntv, name="M" ),<br />
mxMatrix( type="Full", nrow=maxthresh, ncol=nv, free=T, values=.2, labels=LabCov, name="BageTH" ),</p>
<p> # Matrix & Algebra for expected thresholds vector<br />
mxMatrix( type="Full", nrow=maxthresh, ncol=nvo, free=TRUE, values=c(-.1,-.1), lbound=c(-3,rep(.001,ninc)), ubound=3, labels=LabThmz, name="ThMZ"),<br />
mxMatrix( type="Lower", nrow=maxthresh, ncol=maxthresh, free=FALSE, values=1, name="Low" ),<br />
mxAlgebra( expression= cbind(Low%*%ThMZ+ BageTH%x%Age1,Low%*%ThMZ+ BageTH%x%Age2 ), name="ExpThresMZ"),<br />
mxMatrix( type="Full", nrow=maxthresh, ncol=nvo, free=TRUE, values=c(-.2,-.1), lbound=c(-3,rep(.001,ninc)), ubound=3, labels=LabThdz, name="ThDZ"),<br />
mxMatrix( type="Lower", nrow=maxthresh, ncol=maxthresh, free=FALSE, values=1, name="Low" ),<br />
mxAlgebra( expression= cbind(Low%*%ThDZ+ BageTH%x%Age1,Low%*%ThDZ+ BageTH%x%Age2 ), name="ExpThresDZ"), </p>
<p> # Algebra for expected variance/covariance matrix in MZ<br />
mxAlgebra( expression= rbind ( cbind(A+C+E , A+C),<br />
cbind(A+C , A+C+E)), name="expCovMZ" ),<br />
# Algebra for expected variance/covariance matrix in DZ, note use of 0.5, converted to 1*1 matrix<br />
mxAlgebra( expression= rbind ( cbind(A+C+E , 0.5%x%A+C),<br />
cbind(0.5%x%A+C , A+C+E)), name="expCovDZ" )</p>
<p> ),</p>
<p> mxModel("MZ",<br />
mxData( observed=mzData, type="raw" ),<br />
mxFIMLObjective( covariance="ACE.expCovMZ", means="ACE.M", dimnames=selVars,thresholds="ACE.ExpThresMZ", threshnames=c("bw1","bw2"))<br />
),<br />
mxModel("DZ",<br />
mxData( observed=dzData, type="raw" ),<br />
mxFIMLObjective( covariance="ACE.expCovDZ", means="ACE.M", dimnames=selVars,thresholds="ACE.ExpThresDZ", threshnames=c("bw1","bw2"))<br />
),<br />
mxAlgebra( expression=MZ.objective + DZ.objective, name="modelfit" ),<br />
mxAlgebraObjective("modelfit"),<br />
mxCI(c("ACE.sta","ACE.stc","ACE.ste","ACE.h2","ACE.c2","ACE.e2","ACE.ra","ACE.rc","ACE.re"))</p>
<p>)</p>
<p>CholAceModel_Fit <- mxRun(CholAceModel,intervals=TRUE)<br />
CholAceModel_Summ <- summary(CholAceModel_Fit)<br />
CholAceModel_Summ</p>
<p>Any help appreciated! Thanks.</p>
http://openmx.psyc.virginia.edu/thread/4006#commentsOpenMx Error MessagesTue, 16 Jun 2015 09:33:03 +0000Salutfate4006 at http://openmx.psyc.virginia.eduNA values hit for thresholds
http://openmx.psyc.virginia.edu/thread/3996
<p>I am using a modified script for a bivariate twin analysis with two dichotomous variables. </p>
<p>I am stuck with the error message: "Error: In model 'Sat' I was expecting 1 thresholds in column 'nssi1' of matrix/algebra 'DZf.expThresDZf' but I hit NA values after only 0 thresholds. You need to increase the number of thresholds for 'nssi1' and give them values other than NA"</p>
<p>Another user had a similar issue- see previous discussion: (<a href="http://openmx.psyc.virginia.edu/thread/2953" title="http://openmx.psyc.virginia.edu/thread/2953">http://openmx.psyc.virginia.edu/thread/2953</a>). However, I do not believe my problem has to do with the mxFactor command, factors in general, or NAs in my data. </p>
<p>The error message implies there is something wrong with the start values I provided for the threshold ("error message... suggests that they are somehow started at NA"). I have tried a variety of different start values, but this does not seem to be the issue. </p>
<p>Both of my variables have incredibly low prevalence, although there are twins pairs in all groups (MZF, MZM, DZF, DZM) who are both affected (no missing cells in contingency table). Could low prevalence cause an issue with the thresholds?</p>
<p>Any help appreciated! Thanks. </p>
http://openmx.psyc.virginia.edu/thread/3996#commentsOpenMx Error MessagesThu, 28 May 2015 15:49:00 +0000bhuibregtse3996 at http://openmx.psyc.virginia.edufitfunction is not finite
http://openmx.psyc.virginia.edu/thread/3955
<p>Hi,<br />
I am trying to fit a saturated twin model to 9 ordinal variables (representing age at observation), in which participants have either 1, 2 or 3 observations each. Thus, there is quite a bit of missing data. </p>
<p>When running the model I get the following error: Sat5.fitfunction is not finite. </p>
<p>Here is info about version and platform:<br />
OpenMx version: 2.0.1.4157<br />
R version: R version 3.1.1 (2014-07-10)<br />
Platform: x86_64-w64-mingw32<br />
Default optimiser: NPSOL</p>
<p>Does this mean that there could be a problem due to too many NA’s in the data? I expected FIML to take care of this. I saw another thread #3940 about the same issue, but couldn’t really cut out what was causing the error. </p>
<p>I tried the CSOLNP optimizer and mxTryHard() with the same result. Could it be bad starting values that’s causing the error in my case? </p>
<p>When running it in OpenMx1.4-3060 I get the following error message: Objective function returned a value of NaN at iteration 23.63.</p>
<p>I have attached the script in case that helps to clarify anything.</p>
<p>Many thanks,<br />
Karoline</p>
<table id="attachments" class="sticky-enabled">
<thead><tr><th>Attachment</th><th>Size</th> </tr></thead>
<tbody>
<tr class="odd"><td><a href="http://openmx.psyc.virginia.edu/sites/default/files/Saturated_Beta_OpenMx_0.R">Saturated_Beta_OpenMx.R</a></td><td>15.31 KB</td> </tr>
</tbody>
</table>
http://openmx.psyc.virginia.edu/thread/3955#commentsOpenMx Error MessagesFri, 20 Feb 2015 10:18:16 +0000karobro3955 at http://openmx.psyc.virginia.eduProtection stack too large
http://openmx.psyc.virginia.edu/thread/3941
<p>Dear all,</p>
<p>Did anyone have a warning like:</p>
<p>"Warning message:<br />
In runHelper(model, frontendStart, intervals, silent, suppressWarnings, :<br />
Protection stack too large; report this problem to the OpenMx forum"</p>
<p>Does anyone know how we can handle this?</p>
<p>Other information:</p>
<p>- The version of OpenMx: 2.0.0-4004 MASS_7.3-35<br />
- The version of R: 3.1.2<br />
- The operating system and architecture: x86_64, Apple OSX 10.8.5.<br />
- R syntax that brings this warning is a command in "metaSEM": --tssem1--</p>
<p>Thanks!</p>
http://openmx.psyc.virginia.edu/thread/3941#commentsOpenMx Error MessagesFri, 16 Jan 2015 04:57:46 +0000Ryan3941 at http://openmx.psyc.virginia.eduError in omxAssignFirstParameters / omxSetParameters... 'labels' argument must not contain duplicate values
http://openmx.psyc.virginia.edu/thread/3939
<p>This seems to be occurring when I try and constrain values across different matrices by label, then use omxAssignFirstParameters to set starting values - omxSetParameters gives the " 'labels' must not contain duplicate values" error. When I use the same label within the same matrix there is no problem. When browsing into the error, I see that indeed, the labels object within omxSetParameters contains duplicates only when they are specified from different matrices.</p>
http://openmx.psyc.virginia.edu/thread/3939#commentsOpenMx Error MessagesFri, 12 Dec 2014 14:05:08 +0000CharlesD3939 at http://openmx.psyc.virginia.eduError: could not find function "mxThreshold"
http://openmx.psyc.virginia.edu/thread/3932
<p>I'm running a demo script for a one factor model with ordinal data. I'm using OpenMx 1.4-3532 and R version 3.1.2 (2014-10-31). I get the following error message:</p>
<p>> thresholds <- mxThreshold( vars=c("z1","z2","z3"), nThresh=c(1,1,2),<br />
+ free=TRUE, values=c(-1,0,-.5,1.2) )<br />
Error: could not find function "mxThreshold"</p>
<p>Using "library(help=OpenMx)", "mxThreshold" does not appear. What gives?</p>
http://openmx.psyc.virginia.edu/thread/3932#commentsOpenMx Error MessagesThu, 13 Nov 2014 22:00:01 +0000rabil3932 at http://openmx.psyc.virginia.eduError : The RAM model 'blahblah' does not contain any paths
http://openmx.psyc.virginia.edu/thread/3917
<p>This occurs after I change the data associated with an otherwise working matrix specification model... I don't think it should :)</p>
http://openmx.psyc.virginia.edu/thread/3917#commentsOpenMx Error MessagesThu, 30 Oct 2014 18:00:10 +0000CharlesD3917 at http://openmx.psyc.virginia.eduAnother excess memory usage problem - sudden spike when using csolnp
http://openmx.psyc.virginia.edu/thread/3882
<p>CSOLNP is working quite nicely in general, but I have a few circumstances where things go dramatically wrong and crash my machine (hard reboot needed) due to excess memory usage if I don't notice fast enough. This doesn't occur when using npsol. With the earlier memory usage issues ( <a href="http://openmx.psyc.virginia.edu/thread/2551" title="http://openmx.psyc.virginia.edu/thread/2551">http://openmx.psyc.virginia.edu/thread/2551</a> ) memory usage increased gradually, but in this case it seems much more sudden.</p>
<p>A problem model can be downloaded from:<br />
<a href="https://www.dropbox.com/s/kgpsualdlnaowhs/memprobmodel.RData?dl=0" title="https://www.dropbox.com/s/kgpsualdlnaowhs/memprobmodel.RData?dl=0">https://www.dropbox.com/s/kgpsualdlnaowhs/memprobmodel.RData?dl=0</a></p>
<p>test <- mxRun(memprobmodel, intervals=T)</p>
<p>edit: I don't know specifically what causes the issue, but I'm making extensive use of algebra, exponential functions, and definition variables.</p>
<p>editedit: problem *does* still exist even with latest updates (26-8-2014). so far I only experience it when calculating confidence intervals. With the above model, after a few minutes of fitting with memory usage at a couple of hundred mb, it suddenly starts going up very rapidly. The problem occurs on more than 1 pc.</p>
http://openmx.psyc.virginia.edu/thread/3882#commentsOpenMx Error MessagesMon, 25 Aug 2014 14:19:24 +0000CharlesD3882 at http://openmx.psyc.virginia.eduProblem getting parameters from model
http://openmx.psyc.virginia.edu/thread/3701
<p>Hi all,</p>
<p>I hope I'm just not seeing something, but the way you extract coefficients and fit statistics seems to have changed. It used to be that I could extract the coefficients by typing:</p>
<p>summary(model)$parameters</p>
<p>Now, that doesn't work. Normally, I might gripe mentally a bit about learning the new syntax, but I've written an entire package that relies on this functionality within OpenMX. It would probably take hours to find and debug all the error messages. So, is there a way to use the old way of extracting information from an MX model (Outside of downgrading my version of openmx)? Or am I just making things up? If things really have changed, will they probably be changing again? </p>
http://openmx.psyc.virginia.edu/thread/3701#commentsOpenMx Error MessagesThu, 10 Jul 2014 14:44:10 +0000fife3701 at http://openmx.psyc.virginia.edusyntax problem with saturated model
http://openmx.psyc.virginia.edu/thread/3160
<p>Hi, I modified a twin model so that I could look at the saturated model. The twin model runs fine, but I get the following error with the saturated model</p>
<p>Error in mxModel("SAT", mxMatrix(type = "Full", nrow = ntv, ncol = ntv, :<br />
argument is missing, with no default</p>
<p>For some reason R stops reading after ncol=ntv. The rest of the syntax is below:</p>
<p> mxMatrix( type="Full", nrow=ntv, ncol=ntv, free=TRUE, values=.6, label=c("dz11","dz21","dz22"), name="MZL" ),</p>
<p>It's nearly identical to the twin model syntax which runs fine, so I can't imagine why I keep getting the above error. Many thanks for your help.</p>
http://openmx.psyc.virginia.edu/thread/3160#commentsOpenMx Error MessagesFri, 30 May 2014 16:49:18 +0000cvanhulle3160 at http://openmx.psyc.virginia.edumxFactor command
http://openmx.psyc.virginia.edu/thread/2953
<p>Dear all</p>
<p>I am trying to run a saturated model but there is something wrong in the way I have have ordered the variables, as I received this error message:<br />
# Error: In model 'Sat' column 'dm1' is not an ordered factor. Use mxFactor() on this column.</p>
<p>So, I did the following after the reshape command:<br />
TwDEP_DM <- reshape(DEP_DM, idvar = c("PAIRID", "ZYG"), timevar = "TVAB", direction = "wide")<br />
colnames(TwDEP_DM) <- c('PAIRID', 'ZYG', 'dm1', 'dep1', 'age1','dm2', 'dep2', 'age2')<br />
TwDEP_DM$dm1 <- mxFactor(TwDEP_DM$dm1, levels=c(0:2), ordered = TRUE)<br />
TwDEP_DM$dep1 <- mxFactor(TwDEP_DM$dep1, levels=c(0:2), ordered = TRUE)<br />
TwDEP_DM$dm2 <- mxFactor(TwDEP_DM$dm2, levels=c(0:2), ordered = TRUE)<br />
TwDEP_DM$dep2 <- mxFactor(TwDEP_DM$dep2, levels=c(0:2), ordered = TRUE)</p>
<p>But:<br />
> SatFit <- mxRun(SatModel, intervals=F)<br />
Running Sat<br />
# Error: In model 'Sat' I was expecting 1 thresholds in column 'dm1' of matrix/algebra 'MZ.expThresMZ' but I hit NA values after only 0 thresholds. You need to increase the number of free thresholds for 'dm1' and give them values other than NA</p>
<p>Is there anything I can do differently?<br />
I think there is something in the mxFactor () as all of the "0" has been replaced as "1"; "1" with "2" ...<br />
I have tried:<br />
TwDEP_DM$dm1 <- mxFactor(TwDEP_DM$dm1, levels=c(0:2), exclude NA, ordered = TRUE)<br />
TwDEP_DM$dm1 <- mxFactor(TwDEP_DM$dm1, levels=c(0:2), labels (2, NA), ordered = TRUE)</p>
<p>Any help will be much appreciated. </p>
<p>Kind regards<br />
Carol</p>
http://openmx.psyc.virginia.edu/thread/2953#commentsOpenMx Error MessagesMon, 28 Apr 2014 15:55:56 +0000CarolKan2953 at http://openmx.psyc.virginia.eduAvoid default abort when error occurs
http://openmx.psyc.virginia.edu/thread/2629
<p>I'm trying to run multiple SEM-models within a loop (i.e., for simulation purposes), but am experiencing some problems when a model does not run properly (i.e., objective function returns NaN). The default action is to abort and display an error message, which results in aborting the whole loop. </p>
<p>I am looking for a way to make it possible to make sure the loop will continue when one of the models is not returning a result (and of course, I would also like to save the non-result in some way). </p>
<p>I read about the omx_set_error_handler and omx_fatal_errors functions, but cannot seem to find them or how they might work. </p>
<p>Any suggestion on how to solve this problem is greatly appreciated!</p>
http://openmx.psyc.virginia.edu/thread/2629#commentsOpenMx Error MessagesThu, 27 Feb 2014 12:46:08 +0000mverdam2629 at http://openmx.psyc.virginia.edu