predict: S3 Methods: predict

predictR Documentation

S3 Methods: predict

Description

Predict response probabilities from fitted ForceChoice model objects. Given a fitted model and optionally new person parameter (latent trait) values, returns the model-implied response probabilities. When newdata is not provided, predictions are made at the estimated latent trait values for each person.

Usage

## S3 method for class 'MIRT'
predict(object, newdata = NULL, type = c("probability", "response"), ...)

## S3 method for class 'MGPCM'
predict(object, newdata = NULL, type = c("probability", "response"), ...)

## S3 method for class 'MGGUM'
predict(object, newdata = NULL, type = c("probability", "response"), ...)

## S3 method for class 'FCMIRT'
predict(object, newdata = NULL, type = c("probability", "response"), ...)

## S3 method for class 'FCDCM'
predict(object, newdata = NULL, type = c("probability", "response"), ...)

## S3 method for class 'FCGDINA'
predict(object, newdata = NULL, type = c("probability", "response"), ...)

## S3 method for class 'FCGGUM'
predict(object, newdata = NULL, type = c("probability", "response"), ...)

## S3 method for class 'TIRT'
predict(object, newdata = NULL, type = c("probability", "response"), ...)

Arguments

object

A fitted model object of class "MIRT", "MGPCM", "MGGUM", "FCMIRT", "FCDCM", "FCGDINA", "FCGGUM", or "TIRT".

newdata

An optional M \times D matrix of latent trait values at which to compute predictions. If NULL (default), predictions use the estimated object$theta$est.

type

Character; "probability" (default) returns response probabilities, "response" returns expected category or simulated binary responses (random draws).

...

Additional arguments (currently ignored).

Value

type = "probability"

For binary models (MIRT, TIRT): an M \times I matrix of endorsement probabilities. For polytomous models (MGPCM, MGGUM): an M \times \sum K_i matrix of stacked category probabilities. For forced-choice models (FCMIRT, FCGGUM): an M \times \sum K_b matrix of block-pattern probabilities. For FCDCM: an M \times B matrix of marginal block-choice probabilities.

type = "response"

For binary models: an M \times I matrix of simulated 0/1 responses. For polytomous models: an M \times I matrix of category indices. For forced-choice models: an M \times B matrix of chosen pattern indices.

Methods (by class)

  • predict(MIRT): Predict response probabilities or simulated responses from MIRT objects.

  • predict(MGPCM): Predict response probabilities from MGPCM objects.

  • predict(MGGUM): Predict response probabilities from MGGUM objects.

  • predict(FCMIRT): Predict response probabilities from FCMIRT objects.

  • predict(FCDCM): Predict response probabilities from FCDCM objects.

  • predict(FCGDINA): Predict response probabilities from FCGDINA objects. For newdata, provide either binary alpha profiles or class probability rows.

  • predict(FCGGUM): Predict response probabilities from FCGGUM objects.

  • predict(TIRT): Predict response probabilities from TIRT objects.


ForceChoice documentation built on Sept. 13, 2026, 1:06 a.m.