View source: R/classification.R
ccStats | R Documentation |
Provides a set of statistics often used for conveying information regarding the consistency of classifications based on tests.
ccStats(ii, ij, ji, jj)
ii |
The frequency or rate of consistent classifications into category "i". |
ij |
The frequency or rate of inconsistent classifications into categories "i" and "j". |
ji |
The frequency or rate of inconsistent classifications into categories "j" and "i". |
jj |
The frequency or rate of consistent classifications into category "j". |
A list of classification consistency statistics. Specifically, the coefficient of consistent classification (p), the coefficient of consistent classification by chance (p_c), the proportion of positive classifications due to chance (p_c_pos), the proportion of negative classifications due to chance (p_c_neg), and Cohen's Kappa coefficient.
Hanson, Bradley A. (1991). Method of Moments Estimates for the Four-Parameter Beta Compound Binomial Model and the Calculation of Classification Consistency Indexes. American College Testing.
# Generate some fictional data. Say, 1000 individuals take a test with a
# maximum score of 100 and a minimum score of 0.
set.seed(1234)
testdata <- rbinom(1000, 100, rBeta.4P(1000, .25, .75, 5, 3))
hist(testdata, xlim = c(0, 100))
# Suppose the cutoff value for attaining a pass is 50 items correct, and
# that the reliability of this test was estimated to 0.7. First, compute the
# estimated consistency matrix using LL.CA():
cmat <- LL.CA(x = testdata, reliability = .7, cut = 50, min = 0,
max = 100)$consistencymatrix
# To estimate and retrieve consistency statistics using ccStats(),
# feed it the appropriate entries of the consistency matrix.
ccStats(ii = cmat["i", "i"], ij = cmat["i", "j"],
ji = cmat["j", "i"], jj = cmat["j", "j"])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.