gwsem (version 2.1.4)

setupThresholds: Set up thresholds for ordinal indicators

Description

experimental Ordinal indicator thresholds are freely estimated with fixed means and variance. This function adds thresholds to the given model. If no indicators are ordinal, the given model is returned without changes.

Usage

setupThresholds(model)

Arguments

model

an MxModel model, specified using RAM or LISREL notation. The model argument is designed to take the output from e.g. buildOneFac (or the other prebuilt GW-SEM functions), but advanced users can specify their own arbitrary OpenMx Model or use Onyx to draw their path diagrams.

Value

The given MxModel with appropriate thresholds added.

Details

Thresholds are added using mxThreshold. Starting values for thresholds use the defaults provided by this function which assumes a mean of zero and variance of the square root of two. This variance is appropriate for buildOneFac where the implied model variance of ordinal indicators is one plus the square of the factor loading, and the loading's starting value is 1.0.

You generally do not need to call this function directly because it is already called by buildOneFac and similar. This function is provided for advanced users who wish to write their own model building functions.

Examples

Run this code
# NOT RUN {
pheno <- data.frame(anxiety=cut(rnorm(500), c(-Inf, -.5, .5, Inf),
                    ordered_result = TRUE))
m1 <- buildItem(pheno, 'anxiety')
m1 <- setupThresholds(m1)
m1$Thresholds
# }

Run the code above in your browser using DataLab