Learn R Programming

eRm (version 0.15-4)

stepwiseIt: Stepwise item elimination

Description

This function eliminates items stepwise according to one of the following criteria: itemfit, Wald test, Andersen's LR-test

Usage

## S3 method for class 'eRm':
stepwiseIt(object, criterion = list("itemfit"), alpha = 0.05,
           verbose = TRUE, maxstep = NA)

Arguments

object
Object of class eRm.
criterion
List with either "itemfit", "Waldtest" or "LRtest" as first element. Optionally, for the Waldtest and LRtest a second element containing the split criterion can be specified (see details).
alpha
Significance level.
verbose
If TRUE intermediate results are printed out.
maxstep
Maximum number of elimination steps. If NA the procedure stops when the itemset is Rasch homogeneous.

Value

  • The function returns an object of class step containing:
  • XReduced data matrix (bad items eliminated)
  • fitObject of class eRm with the final item parameter elimination
  • it.elimVector contaning the names of the eliminated items
  • res.waldElimination results for Wald test criterion
  • res.itemfitElimination results for itemfit criterion
  • res.LRElimination results for LR-test criterion
  • nstepsNumber of elimination steps

Details

If criterion = list("itemfit") the elimination stops when none of the p-values in itemfit is significant. Within each step the item with the largest chi-squared itemfit value is excluded. If criterion = list("Waldtest") the elimination stops when none of the p-values resulting from the Wald test is significant. Within each step the item with the largest z-value in Wald test is excluded. If criterion = list("LRtest") the elimination stops when Andersen's LR-test is not significant. Within each step the item with the largest z-value in Wald test is excluded.

See Also

LRtest.Rm, Waldtest.Rm, itemfit.ppar

Examples

Run this code
## 2pl-data, 100 persons, 10 items
set.seed(123)
X <- sim.2pl(500, 10, 0.4)
res <- RM(X)

## elimination according to itemfit
stepwiseIt(res, criterion = list("itemfit"))      

## Wald test based on mean splitting
stepwiseIt(res, criterion = list("Waldtest","mean")) 

## Andersen LR-test based on random split
set.seed(123)
groupvec <- sample(1:3, 500, replace = TRUE)
stepwiseIt(res, criterion = list("LRtest",groupvec))

Run the code above in your browser using DataLab