Learn R Programming

cacIRT (version 1.0)

TOtable.F: Classification table for computing True accuracy or consistency

Description

Creates a 2x2 table (for a single cut score), to compute the proportion of correctly classified, or consistently classified, subjects. Code is already generalized to simultaneous multiple cut offs

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

  • comp1classification table
  • comp2P or proportion of subject on the diagonal

Details

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

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...

Run the code above in your browser using DataLab