emxThresholds: Create a set of thresholds for ordinal data

Description Usage Arguments Value See Also Examples

View source: R/emxMatrixBuilders.R

Description

This function creates a threshold matrix as an MxMatrix object.

Usage

1
emxThresholds(data, ordinalCols)

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.

Value

An MxMatrix giving the thresholds.

See Also

emxFactorModel, emxGrowthModel

Examples

1
2
3
4
5
6
7
   
# 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))

jpritikin/emx documentation built on May 19, 2019, 11:50 p.m.