thresholds matrix helper function

No replies
mspiegel's picture
Offline
Joined: 07/31/2009

I started putting together a function that will generate a thresholds matrix. The implementation is attached to this post. The function omxGenerateThresholds accepts five arguments:

  1. data - a data frame that has been transformed with mxFactor()
  2. threshNames - a character vector of the column names. In OpenMx 1.0 must be equal to the column names of the data set.
  3. threshLabels - a character vector of the free parameter names. Used to specify equality constraints.
  4. lowVals - a numeric vector of the low thresholds values.
  5. highVals - a numeric vector of the high threshold values.

So, for example, to generate the thresholds matrix for the test script OrdinalTest.R use the command:
thresh <- omxGenerateThresholds(data, nameList, c("neur", "mdd4l", "neur", "mdd4l"), c(-1.9, 1, -1.9, 1), c(1.9, 1, 1.9, 1))

AttachmentSize
MxThresholdHelper.R2.93 KB