This vignette demonstrates how to
fit an ordinal regression model with plssem using the
titanic dataset.
In plssem, regression-style model syntax like
y ~ x1 + x2 is supported. When the dependent variable
(and/or predictors) are ordinal. Ordinal variables can be supplied via
the ordered argument, or by making sure they are
ordered in the dataset.
This model predicts survival as a function of age and sex.
m_linear <- "Survived ~ Age + Female"
fit_linear <- pls(
m_linear,
data = titanic,
ordered = "Survived",
boot.R = 50,
bootstrap = TRUE,
boot.parallel = "multicore",
boot.ncores = 2
)
summary(fit_linear)Optional: evaluate predictive performance.
To include a non-linear (interaction) effect, add an interaction
term. With ordinal indicators and interactions, plssem
automatically switches to the Monte-Carlo ordinal PLSc estimator.