Hello everybody,

I try to do a Monte Carlo simulation with a very simple SEM. I've got 2 latent variables and 3 categorical indicators with 3 categories per latent variable (see the attachment).

If I run my model (code is also in the attachment) I receive different error messages:

-"In model 'Title' NPSOL returned a non-zero status code 1. The final iterate satisfies the optimality conditions to the accuracy requested..."

-"In model 'Title' NPSOL returned a non-zero status code 6. The model does not satisfy the first-order optimality conditions..."

And in a very few case I don't receive an error message.

I read that the choice of the starting values can solve the problem, so I choose them near the "true" values but the problem still remains.

I also read that underidentification of the model could be the problem, but I fixed the variances of the error terms of the observed variables to 1 ,the means to 0 and one loading of each block to 1, so I think the model should be identified.

I would appreciate any suggestion and/or possible solutions.

Florian

Attachment | Size |
---|---|

sem 3 3.pdf | 7.57 KB |

kat test.r | 6.63 KB |

I'll point to you towards a previous explanation of the status codes:

http://openmx.psyc.virginia.edu/thread/1659

Ordinal data seems to trip status codes more frequently than continuous. Especially when there are few items and categories, small changes in parameter values can lead to essentially zero change in the model likelihood, stopping the optimization. Setting the optimizer tolerance to a higher value (10e-8) can help with that.

Are you getting right/plausible answers with your 1s and 6s?

Hello Ryne,

thank you for your answer and sorry for not responding immediately but simulation takes a while.

If I consider the standardized result, the mean of the estimated pathcoefficients and means of the estimated

loadings seem pretty close to the true standardized parameter.

true standardized parameters:

lambda x2 = 0.447 lambda x3 = 0.371 lambda y2 = 0.514 lambda y3 = -0.625 pathcoef (beta) = 0.7

means of my standardized estimates when no error message appears (n=204):

lambda x2 = 0.446, lambda x3=0.395, lambda y2 = 0.536 lambda y3 = -0.606 beta=0.696

means of my standardized estimates with error 1 warning (n=358):

lambda x2 = 0.454, lambda x3=0.359, lambda y2 = 0.537 lambda y3 = -0.631 beta=0.684

means of my standardized estimates with error 6 warning(n=408):

lambda x2 = 0.445, lambda x3=0.408, lambda y2 = 0.537 lambda y3 = -0.619 beta=0.684

So I think the standardized ones are fine

In contrast the unstandardized coefficients with error 6 message show some outliners and so the means of the estimates aren't as fine as the means of the unstandardized estimates:

means of my estimates with no error warning:

lambda_y_21 lambda_y_31 lambda_x_21 lambda_x_31 beta

8.149751e-01 -1.379400e+02 6.550610e-01 5.570317e-01 1 .033999e+00

means of my estimates with error 1 warning:

lambda_y_21 lambda_y_31 lambda_x_21 lambda_x_31 beta

7.961260e-01 -2.014279e+04 7.041739e-01 5.638443e-01 1.132353e+00

means of my estimates with error 6 warning:

lambda_y_21 lambda_y_31 lambda_x_21 lambda_x_31 beta

0.71940081 -60.91788004 0.89011911 0.79307582 2.89383367

Another question:

Whats the theoretical difference between these two specifications of my path model:

Specification 1

mxPath(from=c("xi1"),to=c("eta1"),arrows=1,free=T,values=0.7,labels="beta"),

mxPath(from=c("xi1","eta1"), arrows=2 , free=c(T,T), values=c(1 , 1),labels=c("Var(Xi)","Var(Zeta)") ,lbound=0.0000001)

Specification 2:

mxPath(from=c("xi1"),to=c("eta1"),arrows=1,free=T,values=0.7,labels="beta"),

mxPath(from="zeta", to="eta1",arrows=1, free=F, values=1, labels="pathzetaxi"),

mxPath(from="zeta", arrows=2 , free=T, values=1,labels="Var(Zeta)",lbound=0.0000001 ) ,

mxPath(from="xi1", arrows=2,free=T,values=1,labels="Var(Xi)",lbound=0.0000001 ) ,

Because I get I get little bit different results and a different number of error messages.

Specification1:

Error warnings: no 1 6 other warnings

n: 204 358 408 30

Specification2:

Error warnings: no 1 6 other warnings

n: 119 560 304 17

Thanks in advance!

Flo