predict.Rd
This function computes expected values for each person and each item based on the individual posterior distribution. The output of this function can be the basis of creating item and person fit statistics.
IRT.predict(object, dat, group=1) # S3 method for din predict(object, group=1, ...) # S3 method for gdina predict(object, group=1, ...) # S3 method for mcdina predict(object, group=1, ...) # S3 method for gdm predict(object, group=1, ...) # S3 method for slca predict(object, group=1, ...)
object | Object for the S3 methods |
---|---|
dat | Dataset with item responses |
group | Group index for use |
... | Further arguments to be passed. |
A list with following entries
Array with expected values (persons \(\times\) classes \(\times\) items)
Array with expected probabilities for each category (persons \(\times\) categories \(\times\) classes \(\times\) items)
Array with variance in predicted values for each person and each item.
Array with residuals for each person and each item
Array with standardized residuals for each person and each item
if (FALSE) { ############################################################################# # EXAMPLE 1: Fitted Rasch model in TAM package ############################################################################# #--- Model 1: Rasch model library(TAM) mod1 <- TAM::tam.mml(resp=TAM::sim.rasch) # apply IRT.predict function prmod1 <- CDM::IRT.predict(mod1, mod1$resp ) str(prmod1) } ############################################################################# # EXAMPLE 2: Predict function for din ############################################################################# # DINA Model mod1 <- CDM::din( CDM::sim.dina, q.matr=CDM::sim.qmatrix, rule="DINA" ) summary(mod1) # apply predict method prmod1 <- CDM::IRT.predict( mod1, sim.dina ) str(prmod1)