OpenMx Error Messages

Posted on
No user picture. CarolKan Joined: 04/17/2014

mxFactor command

Dear all

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:
# Error: In model 'Sat' column 'dm1' is not an ordered factor. Use mxFactor() on this column.

So, I did the following after the reshape command:
TwDEP_DM <- reshape(DEP_DM, idvar = c("PAIRID", "ZYG"), timevar = "TVAB", direction = "wide")
colnames(TwDEP_DM) <- c('PAIRID', 'ZYG', 'dm1', 'dep1', 'age1','dm2', 'dep2', 'age2')
TwDEP_DM$dm1 <- mxFactor(TwDEP_DM$dm1, levels=c(0:2), ordered = TRUE)

Posted on
No user picture. mverdam Joined: 02/04/2014

Avoid default abort when error occurs

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.

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).

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

Error in summary()

Hi,

I created a model without any free parameters. I'd like to run the model to obtain the likelihood of some data under this model. The model runs fine but summary() returns the error that the comparison "matrix == nameA" is valid only for atomic and list. It seems that summary() is missing a check for empty lists of free parameters. This is the traceback():

8: eval(expr, envir, enclos)
7: eval(e, x, parent.frame())
6: subset.data.frame(ptable, matrix == nameA, select = "row", drop = TRUE)
5: subset(ptable, matrix == nameA, select = "row", drop = TRUE)

Posted on
Picture of user. Daria Henning Joined: 12/18/2013

Error: The observed covariance matrix is not a symmetric matrix

I've got the following error message when fitting a one factor model:
Error: The observed covariance matrix is not a symmetric matrix

Below is the code. When looking at the cov matrix it looked quite summetrical to me...

Does somebody have suggestions?

Thanks a lot in advance.

obsnames = c("intrthought","recdreams","flashbk","emoreact","physreact","avoidthou","avoidremind","amnesia","lossinter","detach","restrAff","foreFut","SleepDis","Irritab","DifConcentr","Hypervigilance","ExaggStartle")

obslabels = list (obsnames,obsnames)

values = c(1.00,
.70, 1.00,

Posted on
Picture of user. Daria Henning Joined: 12/18/2013

NPSOL returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions to the required accur

Hi,

Finally I managed to fit a longitudinal one- factor model but now I received the following warning message:

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)

As I am a beginner in OpenMX suggestions and any help is very welcome.
Thanks in advance!

############################################################
This is my code:
############################################################

Posted on
Picture of user. Daria Henning Joined: 12/18/2013

Error: unexpected ',' in "

Hi,

I am getting a bit lost with the following error below. I frequently get it when runnning the specified data matrices. Sometimes the error pops up at different points. As I really cannot see any typos etc. I am starting to get quite annoyed about it.

Does somebody has any suggestions?

I would appreciate it very much!
Thanks already.

title = " Factor model Personality traits at 3 timepoints"
> obs = mxData(observed = akkercov, type = 'cov', means = petrmeans, numObs = 290)
> matrixL = mxMatrix(
+ type = 'Full',
+ nrow = 15,
+ ncol = 3,
+ free = (TRUE,FALSE,FALSE,

Posted on
Picture of user. Daria Henning Joined: 12/18/2013

Error: The observed covariance matrix is not a positive-definite matrix

Hi all,

I want to fit a one fatcor longitudinal model at three measuremet time points based on an observed covariance/correlation matrix from an published article. Unfortunately I get the following error message when running the obs function, see below.

This is the error:
Error: The observed covariance matrix is not a positive-definite matrix

It would be great if somebody could help with some suggestions!

This is the beginning of the code:

## create observed covariance matrix

obsnames = c("extrT1","beneT1","conscT1","emostT1","imagT1",

Posted on
No user picture. Samaneh2013 Joined: 06/19/2013

Installing OpenMx on R 2.15

I have a difficulty of installing OpenMx in version 2.15 and version 3, I have types library (OpenMx) but this gives a warning sign!

Posted on
No user picture. Psychometrics Joined: 01/10/2010

Troubles with OpenMx example

Hi,

I have tried to run the code as documented here:
http://openmx.psyc.virginia.edu/svn/trunk/demo/UnivariateTwinAnalysis_MatrixRaw.R

Don't know why but I always get the following error message:

Error in mxModel("twinACE", mzModel, dzModel, mxAlgebra(expression = MZ.objective + :
could not find function "mxFitFunctionAlgebra"

Any idea what is wrong here? Many thanks in advance!

Posted on
Picture of user. RobK Joined: 04/19/2011

Error when summary() applied to already-run mxModel using mxRObjective()

FYI, whenever I run an mxModel that includes mxRObjective() for its objective function, and then try to get its summary output, it throws this error:
Error in match(x, table, nomatch = 0L) :
no slot of name "dims" for this object of class "MxRObjective"

--Rob K.