Learn R Programming

TAM (version 1.6-0)

msq.itemfit: Mean Squared Residual Based Item Fit Statistics (Infit, Outfit)

Description

This function computes computed the outfit and infit statistic for items or item groups. Contrary to tam.fit, this function is not based on simulation from individual posterior distributions but rather on evaluating the individual posterior.

Usage

msq.itemfit( object , fitindices=NULL )

## S3 method for class 'msq.itemfit':
summary(object, \dots)

Arguments

object
Object for which the classes IRT.data, IRT.posterior and predict are defined.
fitindices
Vector with integers defining the item groups for which the fit should be evaluated.
...
Further arguments to be passed

Value

  • Data frame with outfit and infit statistics

Examples

Run this code
#############################################################################
# SIMULATED EXAMPLE 1: Simulated data Rasch model
############################################################################# 	

#*** simulate data
library(sirt)
set.seed(9875)
N <- 2000
I <- 20
b <- sample( seq( -2 , 2 , length=I ) )
a <- rep( 1, I )
# create some misfitting items
a[c(1,3)] <- c(.5 , 1.5 )
# simulate data
dat <- sirt::sim.raschtype( rnorm(N) , b=b , fixed.a=a )
#*** estimate Rasch model
mod1 <- tam.mml(resp=dat) 

#--- item fit from "msq.itemfit" function
fit1 <- msq.itemfit(mod1)
summary( fit1 )

#--- item fit using simulation in "tam.fit"
fit0 <- tam.fit( mod1 )
summary(fit0)

# define some item groups for fit assessment
fitindices <- rep( c(1,2) , each=10)
fit2 <- msq.itemfit( mod1 , fitindices )
summary(fit2)

Run the code above in your browser using DataLab