Published on *OpenMx* (http://openmx.psyc.virginia.edu)

By *CarolKan*

Created *04/28/2014 - 11:55*

Mon, 04/28/2014 - 11:55 — CarolKan [1]

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)

TwDEP_DM$dep1 <- mxFactor(TwDEP_DM$dep1, levels=c(0:2), ordered = TRUE)

TwDEP_DM$dm2 <- mxFactor(TwDEP_DM$dm2, levels=c(0:2), ordered = TRUE)

TwDEP_DM$dep2 <- mxFactor(TwDEP_DM$dep2, levels=c(0:2), ordered = TRUE)

But:

> SatFit <- mxRun(SatModel, intervals=F)

Running Sat

# 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

Is there anything I can do differently?

I think there is something in the mxFactor () as all of the "0" has been replaced as "1"; "1" with "2" ...

I have tried:

TwDEP_DM$dm1 <- mxFactor(TwDEP_DM$dm1, levels=c(0:2), exclude NA, ordered = TRUE)

TwDEP_DM$dm1 <- mxFactor(TwDEP_DM$dm1, levels=c(0:2), labels (2, NA), ordered = TRUE)

Any help will be much appreciated.

Kind regards

Carol

**Links:**

[1] http://openmx.psyc.virginia.edu/users/carolkan

[2] http://openmx.psyc.virginia.edu/thread/325

[3] http://openmx.psyc.virginia.edu/thread/3955

[4] http://openmx.psyc.virginia.edu/forums/openmx-help/openmx-error-messages