Predict Methods for Item Response Models
Prediction of (cumulated) response probabilities and responses based on fitted item response models.
## S3 method for class 'pcmodel' predict(object, newdata = NULL, type = c("probability", "cumprobability", "mode", "median", "mean", "category-information", "item-information", "test-information"), ref = NULL, ...)
object |
a fitted model object whose item parameters should be used for prediction. |
newdata |
an optional (possibly named) vector of person parameters
used for prediction. If |
type |
character of length one which determines the type of prediction (see details below). |
ref |
arguments passed over to internal calls of |
... |
further arguments which are currently not used. |
Depending on the value of type
either probabilities, responses or
some form of information under the model specified in object
are
returned:
If type
is "probability"
, the category response probabilities
are returned.
If type
is "cumprobability"
, the cumulated category response
probabilities are returned, i.e., P(X_{ij} ≥q k) with k
corresponding to the categories of item j.
If type
is "mode"
, the most probable category response for a
given subject and item is returned.
If type
is "median"
, the first category k where
P(X_{ij} = k) ≥q 0.5 is returned.
If type
is "mean"
, the rounded expected category response,
i.e., E(X_{ij}|θ_{i}), is returned.
If type
is "category-information"
, the item-category
information as suggested by Bock (1972) is returned.
If type
is "item-information"
, the item information as
suggested by Samejima (1974) is returned.
If type
is "test-information"
, the sum over the individual
item information values is returned.
A (possibly named) numeric matrix with rows corresponding to subjects and
columns corresponding to the whole test, the single items or categories. The
exact content depends on the value of type
(see details above).
Bock RD (1972). Estimating Item Parameters and Latent Ability When Responses Are Scored in Two or More Nominal Categories. Psychometrika, 37(1), 29–51.
Samejima F (1974). Normal Ogive Model on the Continuous Response Level in the Multidimensional Latent Space. Psychometrika, 39(1), 111–121.
The help page of the generic function predict
and other
predict methods (e.g., predict.lm
, predict.glm
,
...)
o <- options(digits = 4) ## load verbal aggression data data("VerbalAggression", package = "psychotools") ## fit a partial credit model to first ten items pcmod <- pcmodel(VerbalAggression$resp[, 1:10]) ## predicted response probabilities for each subject and category (the default) head(predict(pcmod), 3) ## predicted mode (most probable category) for certain subjects whose person ## parameters are given via argument "newdata" predict(pcmod, type = "mode", newdata = c("Sarah" = 1.2, "Michael" = 0.1, "Arnd" = -0.8)) ## rounded expected category value for the same subjects predict(pcmod, type = "mean", newdata = c("Sarah" = 1.2, "Michael" = 0.1, "Arnd" = -0.8)) ## in the Rasch model mode, mean and median are the same raschmod <- raschmodel(VerbalAggression$resp2[, 1:10]) med <- predict(raschmod, type = "median") mn <- predict(raschmod, type = "mean") mod <- predict(raschmod, type = "mode") head(med, 3) all.equal(med, mn) all.equal(mod, mn) options(digits = o$digits)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.