diagnostic {lsirm12pl} | R Documentation |
Diagnostic the result of LSIRM model
Description
diagnostic
is used to diagnostic the result of LSIRM model.
Usage
diagnostic(
object,
plot = TRUE,
draw.item = list(beta = "first", theta = "first", alpha = "second"),
which.draw = c("beta", "gamma")
)
Arguments
object |
object of class |
plot |
If |
draw.item |
Select items for diagnosis. A default "first" is drawing the first item for selected parameters in |
which.draw |
Select parameters for diagnosis. For the 1PL model, "beta", "theta" and "gamma" are available. "alpha" is only available in the 2PL model. |
Value
diagnostic
returns plots for checking MCMC convergence for selected parameters.
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))
# 1PL model
diagnostic(lsirm_result, plot=TRUE,
which.draw=c("beta","theta","gamma"))
# 1PL model, multiple items
diagnostic(lsirm_result, plot=TRUE, draw.item=list(beta = c(1,2,3)),
which.draw=c("beta", "gamma"))
lsirm_result <- lsirm(data ~ lsirm2pl(spikenslab = FALSE, fixed_gamma = FALSE))
# 2PL model
diagnostic(lsirm_result, plot=TRUE,
which.draw=c("beta", "theta", "alpha", "gamma"))