dropPerfectScores: Drop subjects and items with all perfect scores

View source: R/fitIRT.R

dropPerfectScoresR Documentation

Drop subjects and items with all perfect scores

Description

This function drops variables/items and subjects that have all perfect scores (either all 0's or all 1's) in a data table.

Usage

dropPerfectScores(
  dat,
  scoreref. = "score",
  itemref. = "Item",
  idref. = "id",
  tol. = 0.001
)

Arguments

dat

The input data table

scoreref

The column name of the score variable in dat

itemref

The column name of the item variable in dat

idref

The column name of the id variable in dat

tol

Tolerance level for checking perfect scores – .01 would drop subjects with less than 1% correct or incorrect

Value

The input data table (dat) without variables/items and subjects with all perfect scores.

Examples

dat <- data.table(id=c(1,1,1,2,2,2,3,3,3), Item=c('I1','I2','I3','I1','I2','I3','I1','I2','I3'),
   score=c(1,0,1,0,0,0,0,1,1))
print(dropPerfectScores(dat))

cdriveraus/bigIRT documentation built on Sept. 14, 2024, 5:42 a.m.