OCP | R Documentation |
The observable characteristic plot is an analogue of the item characteristic curve for latent class models. Estimates of the class success probability for each latent is plotted. Reference lines are added for various groups which are expected to have roughly the same probability of success.
OCP(x, n, lclabs, pi, pilab = names(pi), lcnames = names(x),
a = 0.5, b = 0.5, reflty = 1, ..., newplot = TRUE,
main = NULL, sub = NULL, xlab = "Latent Classes", ylab = "Probability",
cex = par("cex"), xlim = NULL, ylim = NULL, cex.axis = par("cex.axis"))
OCP2(x, n, lclabs, pi, pilab = names(pi), lcnames = names(x),
set1 = seq(1, length(x)-1, 2), setlabs = c("Set1", "Set2"),
setat = -1, a = 0.5, b = 0.5, reflty = 1, ..., newplot = TRUE,
main = NULL, sub = NULL, xlab = "Latent Classes", ylab = "Probability",
cex = par("cex"), xlim = NULL, ylim = NULL, cex.axis = par("cex.axis"))
x |
Vector of success counts for each latent class. |
n |
Vector of of the same size as |
lclabs |
Character vector of plotting symbols for each latent class |
pi |
Vector of probability estimates for various levels. |
pilab |
Character vector of names for each level. |
lcnames |
Character vector of names for each latent class for axis. |
set1 |
For |
setlabs |
Character vectors of set labels for |
setat |
Numeric scalar giving the x-coordinate for set labels. |
a |
The first parameter for beta pseudo-prior, passed to
|
b |
The second parameter for beta pseudo-prior, passed to
|
reflty |
Provides the line type (see
|
... |
Additional graphics parameters passed to
|
newplot |
Logical. If true, a new plotting window is created. Otherwise, information is added to existing plotting window. |
main |
Character scalar giving main title (see
|
sub |
Character scalar giving sub title (see
|
xlab |
Character scalar giving x-axis label (see
|
ylab |
Character scalar giving x-axis label (see
|
cex |
Scalar giving character expansion for plotting symbols (see
|
xlim |
Plotting limits for x-axis (see
|
ylim |
Plotting limits for y-axis (see
|
cex.axis |
Scalar giving character expansion for latent class
names (axis tick labels; |
Most cognitively diagnostic models for assessments assume that students with different patterns of skills will have different patterns of success and failures. The goal of this plot type is to empirically check to see if the various groups conform to their expected probability.
The assumption is that the population is divided into a number of
latent classes (or groups of latent classes) and that the class
label for each member of the class is known. The latent classes are
partitioned into levels, where each level is assumed to have
roughly the same proportion of success. (This is often
c("-","+")
for negative and positive skill patterns, but there
could be multiple levels.)
The key idea of the observable characteristic plot is to compare a
credibility interval for the success probability in each latent class,
to the modelled success probability given by its level. A beta
credibility interval is computed for each latent class using
betaci(x,n,a,b)
, with the expected value set at
(x+a)/(n+a+b)
. The plotting symbols given in lclabs
are
plotted at the mean (usually, these correspond to the latent class is
in), with vertical error bars determined by betaci
. Horizontal
reference lines are added at the values given by pi
. The idea
is that if the error bars cross the reference line for the appropriate
level, then the latent class fits the model, if not it does not.
The variant OCP2
is the same except that the latent classes are
further partitioned into two sets, and the labels for the latent
classes for different sets are plotted on different lines. This is
particularly useful for testing whether attributes which are not
thought to be relevant to a given problem are actually irrelevant.
The output of betaci
is returned invisibly.
Russell Almond
Almond, R.G., Mislevy, R.J., Steinberg, L.S., Williamson, D.M. and Yan, D. (2015) Bayesian Networks in Educational Assessment. Springer. Chapter 10.
Sinharay, S. and Almond, R.G. (2006). Assessing Fit of Cognitively Diagnostic Models: A case study. Educational and Psychological Measurement. 67(2), 239–257.
Sinharay, S., Almond, R. G. and Yan, D. (2004). Assessing fit of models with discrete proficiency variables in educational assessment. ETS Research Report. http://www.ets.org/research/researcher/RR-04-07.html
betaci
nn <- c(30,15,20,35)
pi <- c("+"=.15,"-"=.85)
grouplabs <- c(rep("-",3),"+")
x <- c("(0,0)"=7,"(0,1)"=4,"(1,0)"=2,"(1,1)"=31)
OCP (x,nn,grouplabs,pi,c("-","+"),ylim=c(0,1), reflty=c(2,4),
main="Data that fit the model")
x1 <- c("(0,0)"=7,"(0,1)"=4,"(1,0)"=11,"(1,1)"=31)
OCP (x1,nn,grouplabs,pi,c("-","+"),ylim=c(0,1), reflty=c(2,4),
main="Data that don't fit the model")
nnn <- c("(0,0,0)"=20,"(0,0,1)"=10,
"(0,1,0)"=10,"(0,1,0)"=5,
"(1,0,0)"=10,"(1,0,1)"=10,
"(1,1,1)"=10,"(1,1,1)"=25)
xx <- c("(0,0,0)"=5,"(0,0,1)"=2,
"(0,1,0)"=2,"(0,1,1)"=2,
"(1,0,0)"=2,"(1,0,1)"=0,
"(1,1,0)"=9,"(1,1,1)"=21)
grouplabs1 <- rep(grouplabs,each=2)
OCP2 (xx,nnn,grouplabs1,pi,c("-","+"),ylim=c(0,1), reflty=c(2,4),
setlabs=c("Low Skill3","High Skill3"),setat=-.8,
main="Data for which Skill 3 is irrelevant")
xx1 <- c("(0,0,0)"=2,"(0,0,1)"=5,
"(0,1,0)"=1,"(0,1,1)"=3,
"(1,0,0)"=0,"(1,0,1)"=2,
"(1,1,0)"=5,"(1,1,1)"=24)
OCP2 (xx1,nnn,grouplabs1,pi,c("-","+"),ylim=c(0,1), reflty=c(2,4),
setlabs=c("Low Skill3","High Skill3"),setat=-.8,
main="Data for which Skill 3 is relevant")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.