Learn R Programming

eRm (version 0.15-3)

gofIRT: Various model tests and fit indices

Description

This function computes various model tests and fit indices for objects of class ppar: Collapsed deviance, Casewise deviance, Rost's LR-test, Hosmer-Lemeshow test, R-Squared measures, confusion matrix, ROC analysis.

Usage

## S3 method for class 'ppar':
gofIRT(object, groups.hl = 10, cutpoint = 0.5)

Arguments

object
Object of class ppar (from person.parameter()).
groups.hl
Number of groups for Hosmer-Lemeshow test (see details).
cutpoint
Integer between 0 and 1 for computing the 0-1 model matrix from the estimated probabilities

Value

  • The function gofIRT returns an object of class gof containing:
  • test.tableOuput for model tests.
  • R2List with R-squared measures.
  • classifierConfusion matrix, accuracy, sensitivity, specificity.
  • AUCArea under ROC curve.
  • GiniGini coefficient.
  • ROCFPR and TPR for different cutpoints.
  • opt.cutOptimal cutpoint determined by ROC analysis.
  • predobjPrediction output from ROC analysis (ROCR package)

Details

So far this test statistics are implemented only for dichotomous models without NA's. The Hosmer-Lemeshow test is computed by splitting the response vector into percentiles, e.g. groups.hl = 10 corresponds to decile splitting.

References

Mair, P., Reise, S. P., and Bentler, P. M. (2008). IRT goodness-of-fit using approaches from logistic regression. UCLA Statistics Preprint Series.

See Also

itemfit.ppar,personfit.ppar,LRtest

Examples

Run this code
#Goodness-of-fit for a Rasch model
res <- RM(raschdat1)
pres <- person.parameter(res)
gof.res <- gofIRT(pres)
gof.res
summary(gof.res)

Run the code above in your browser using DataLab