Learn R Programming

cacIRT (version 1.3)

TOtable.F: A general classification table for computing True accuracy or consistency

Description

Creates a 2x2 table (or larger for multiple cutscores), to compute the proportion of correctly classified, or consistently classified, subjects. Can easily be modified to return kappa or other summaries as needed.

Usage

TOtable.F(theta, os, theta.cutoff, os.cutoff)

Arguments

theta
a vector of scores, could be True scores, or simply the first test's scores
os
a vector of scores with elements corresponding to those given for theta. Could be observed scores, or the second test's scores
theta.cutoff
the cut score on the same scale as the scores given in theta
os.cutoff
the cut score on the same scale as the scores given in os

Value

  • Tableclassification table with margins
  • PP or proportion of subjects on the diagonal, raw accuracy/consistency

Details

The cut scores need to be on the same scale as their subjects' scores, but do not need to match each other. For example, one test scored with theta.hat and a theta scaled cut score, and the second scored on total score and a number correct cut score. See example.

Examples

Run this code
##with simple 4 item 1PL simulated test:
	## find True classification accuracy of theta.hat and total score
	## use a cut score of theta = 0 (assume true score for total score cut score)

	params<-matrix(c(1,1,1,1,-2,1,0,1,0,0,0,0),4,3)
	theta <-rnorm(100)
	rdm<-sim(params, theta)	
	theta.hat <- MLE(rdm,params)
	total.score <- rowSums(rdm)
	t.cut<-0
	x.cut <- sum(irf(params, t.cut)$f)

TOtable.F(theta, theta.hat, t.cut, t.cut)$P
TOtable.F(theta, total.score, t.cut, x.cut)$P 

# for 1PL model total score is sufficient for theta.hat.
# repeat with 2PL or 3PL items to see effect of classifying 
# on theta.hat instead of total score

Run the code above in your browser using DataLab