gofIRT: Various model tests and fit indices

Description Usage Arguments Details Value References See Also Examples

View source: R/gofIRT.R

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

1
2
## 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

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.

Value

The function gofIRT returns an object of class gof containing:

test.table

Ouput for model tests.

R2

List with R-squared measures.

classifier

Confusion matrix, accuracy, sensitivity, specificity.

AUC

Area under ROC curve.

Gini

Gini coefficient.

ROC

FPR and TPR for different cutpoints.

opt.cut

Optimal cutpoint determined by ROC analysis.

predobj

Prediction output from ROC analysis (ROCR package)

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

1
2
3
4
5
6
#Goodness-of-fit for a Rasch model
res <- RM(raschdat1)
pres <- person.parameter(res)
gof.res <- gofIRT(pres)
gof.res
summary(gof.res)

Example output

Goodness-of-Fit Results:
Collapsed Deviance = 770.574 (df = 780, p-value = 0.588)
Pearson R2: 0.275
Area Under ROC: 0.803


Goodness-of-Fit Tests
                      value         df p-value
Collapsed Deviance  770.574        780   0.588
Hosmer-Lemeshow       8.026          8   0.431
Rost Deviance      2564.654 1073741794   1.000
Casewise Deviance  3221.328       2945   0.000

R-Squared Measures
Pearson R2: 0.275
Sum-of-Squares R2: 0.275
McFadden R2: 0.287

Classifier Results - Confusion Matrix (relative frequencies)
         observed
predicted     0     1
        0 0.404 0.135
        1 0.130 0.330

Accuracy: 0.735
Sensitivity: 0.709
Specificity: 0.757
Area under ROC: 0.803
Gini coefficient: 0.606

eRm documentation built on May 30, 2017, 4:26 a.m.

Related to gofIRT in eRm...