plot.lsirm {lsirm12pl} | R Documentation |
Plotting the interaction map of fitted LSIRM model
Description
plot is used to plot the latent space of fitted LSIRM model.
Usage
## S3 method for class 'lsirm'
plot(
x,
option = "interaction",
rotation = FALSE,
cluster = NA,
interact = FALSE,
...
)
Arguments
x |
object of class |
option |
character; If value is "interaction", draw the interaction map that represents interactions between respondents and items. If value is "beta", draw the boxplot for the posterior samples of beta. If value is "theta", draw the distribution of the theta estimates per total test score for the |
rotation |
Logical; If TRUE the latent positions are visualized after oblique (oblimin) rotation. |
cluster |
Logical; If TRUE the cluster result are visualized by Point Process Cluster Analysis. |
interact |
Logical; If TRUE, draw the interaction map interactively. |
... |
Additional arguments for the corresponding function. |
Value
plot
returns the interaction map or boxplot for parameter estimate.
Examples
# generate example item response matrix
data <- matrix(rbinom(500, size = 1, prob = 0.5),ncol=10,nrow=50)
lsirm_result <- lsirm(data ~ lsirm1pl(spikenslab = FALSE, fixed_gamma = FALSE))
plot(lsirm_result)
# use oblique rotation
plot(lsirm_result, rotation = TRUE)
# plotly
plot(lsirm_result, interact = TRUE)
# clustering
plot(lsirm_result, cluster = TRUE)