View source: R/MLCAfunctions.R
plot.multiLCA | R Documentation |
Visualizes conditional response probabilities estimated by the multiLCA
function. The method works for both single- and multilevel models.
Let out
denote the list object returned by the multiLCA
function. Executing plot(out)
visualizes the conditional response probabilities given by the mPhi
matrix in out
.
## S3 method for class 'multiLCA'
plot(x, horiz = FALSE, clab = NULL, ...)
x |
The object returned by the |
horiz |
Whether item labels should be oriented horizontally ( |
clab |
A character vector with user-specified class labels, if available, in the order "Class 1", "Class 2", ... under the default settings, i.e. top-to-bottom. Default |
... |
Additional plotting arguments |
No return value
# Use IEA data
data = dataIEA
# Define vector with names of columns with items
Y = colnames(data)[4+1:12]
# Define number of (low-level) classes
iT = 3
# Estimate single-level measurement model
out = multiLCA(data = data, Y = Y, iT = iT)
out
# Plot conditional response probabilities with default settings
plot(out)
# Plot with vertical item labels and custom class labels
plot(out, horiz = FALSE, clab = c("Maximal", "Engaged", "Subject"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.