emxThresholds {EasyMx}R Documentation

Create a set of thresholds for ordinal data

Description

This function creates a threshold matrix as an MxMatrix object.

Usage

emxThresholds(data, ordinalCols, deviation=TRUE)

Arguments

data

The data frame or matrix for which thresholds should be created.

ordinalCols

optional character vector. The names of the ordinal variables in the data.

deviation

logical. Return the list of OpenMx objects needed for the deviation form of the threholds (default) or just the raw thresholds matrix

Value

An MxMatrix giving the thresholds.

See Also

emxFactorModel, emxGrowthModel

Examples

   
# Example
require(EasyMx)
data(jointdata)
jointdata[, c(2, 4, 5)] <- mxFactor(jointdata[,c(2, 4, 5)],
	levels=sapply(jointdata[,c(2, 4, 5)], function(x){sort(unique(x))}))
emxThresholds(jointdata, c(FALSE, TRUE, FALSE, TRUE, TRUE))


[Package EasyMx version 0.3-2 Index]