setupThresholds: Set up thresholds for ordinal indicators

Description Usage Arguments Details Value Examples

View source: R/model.R

Description

\lifecycle

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

1

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.

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.

Value

The given MxModel with appropriate thresholds added.

Examples

1
2
3
4
5
pheno <- data.frame(anxiety=cut(rnorm(500), c(-Inf, -.5, .5, Inf),
                    ordered_result = TRUE))
m1 <- buildItem(pheno, 'anxiety')
m1 <- setupThresholds(m1)
m1$Thresholds

gwsem documentation built on Jan. 18, 2022, 1:09 a.m.