drm-methods {plink} | R Documentation |
This function computes the probability of correct responses (and optionally, incorrect responses) for one or more items for a given set of theta values using the 1PL, 2PL, or 3PL model, depending on the included item parameters.
drm(x, theta = seq(-4,4,0.05), D = 1.7, incorrect = FALSE, print.mod = FALSE, ...) ## S4 method for signature 'numeric' drm(x, theta, D, incorrect, print.mod, ...) ## S4 method for signature 'matrix' drm(x, theta, D, incorrect, print.mod, ...) ## S4 method for signature 'data.frame' drm(x, theta, D, incorrect, print.mod, ...) ## S4 method for signature 'list' drm(x, theta, D, incorrect, print.mod, ...) ## S4 method for signature 'irt.pars' drm(x, theta, D, incorrect, print.mod, ...) ## S4 method for signature 'sep.pars' drm(x, theta, D, incorrect, print.mod, ...)
x |
an R object containing item parameters |
theta |
vector of theta values for which probabilities will be computed.
If theta is not specified, an equal interval range of values from -4 to 4 is used
with an increment of 0.05 |
D |
scaling constant (for the normal metric D = 1.7, for the logistic metric D = 1) |
incorrect |
if TRUE , compute probabilities for the incorrect response category) |
print.mod |
if TRUE , print the model that was used (i.e. 1PL, 2PL, or 3PL) |
... |
further arguments passed to or from other methods |
Returns an object of class irt.prob
x
is
a vector of difficulty parameters. Under this method the discrimination values will
default to 1 for all items. x
should contain at least two
columns, the first for item discriminations (identical for all items) and the second
for item difficulties. The lower asymptote defaults to zero for all items; however, a
third column of zeros can be included.x
should include at lease two columns, the first for item
discriminations and the second for item difficulties. The lower asymptote defaults to
zero for all items; however, a third column of zeros can be included.x
should include three columns, the first for item discriminations,
the second for item difficulties, and the third for lower asymptote values.x
should contain
at least two list elements, the first for item discriminations (identical for all items)
and the second for item difficulties. The lower asymptote defaults to zero for all items;
however, a third element with a vector/matrix of zeros can be included.x
should include at lease two list elements, the first for item
discriminations and the second for item difficulties. The lower asymptote defaults to
zero for all items; however, a third element with a vector/matrix of zeros can be included.x
should include three list elements, the first for item discriminations,
the second for item difficulties, and the third for lower asymptote values."irt.pars"
. If x
contains polytomous items, a
warning will be displayed stating that probabilities will be computed for the
dichotomous items only. If x
contains parameters for multiple groups, a list of
"irt.prob"
objects will be returned.sep.pars
. If x
contains polytomous items, a
warning will be displayed stating that probabilities will be computed for the
dichotomous items only.
The indices 0 and 1 are used in the column labels for incorrect and correct responses
respectively (e.g. the label d1.0 indicates the incorrect response column for item 1, d1.1
indicates the correct response column for the same item). If incorrect
= FALSE
,
all column labels will end with .1
Jonathan P. Weeks weeksjp@gmail.com
Birnbaum, A. (1968) Some latent trait models and their use in inferring an examinee's ability In F. M. Lord & M. R. Novick (Eds.) Statistical Theories of Mental Test Scores. Reading, MA: Addison-Wesley
Rasch, G. (1960) Probabilistic Models for Some Intelligence and Attainment Tests Copenhagen, Denmark: Danish Institute for Educational Research
mixed:
compute probabilities for mixed-format items
plot:
plot item characteristic/category curves
irt.prob
, irt.pars
, sep.pars:
classes
## 1PL # A single item with a difficulty at 1 logit x <- drm(1) plot(x) # Three items with a difficulties at -2.2, -1.7, and 0.54 logits respectively # Assume a constant discrimination of 1 for each item b <- c(-2.2,-.7,1.54) x <- drm(b) plot(x) # Five items with a constant discrimination equal to 1.2 # Do not use the scaling constant a <- rep(1.2,5) b <- c(-2,-1,0,1,2) pars <- list(a,b) x <- drm(pars,D=1) plot(x,combine=5,item.names="Items 1-5") ## 2PL # Compute probabilities for five items at a theta value of 1.5 logits # Print the model a <- c(1,.8,.6,1.2,.9) b <- c(-1.7,2.2,.4,-1,-.4) pars <- cbind(a,b) drm(pars,theta=1.5,print.mod=TRUE)@prob # Include a vector of zeros for the lower asymptote # Compute probabilities for incorrect responses a <- c(.63,1.14,.89,1.01,1.51,.58) b <- c(-1.9,.08,1.6,-1.4,.5,-2.3) c <- rep(0,6) pars <- cbind(a,b,c) x <- drm(pars,incorrect=TRUE) plot(x) ## 3PL a <- c(1,.8,.4,1.5,.9) b <- c(-2,-1,0,1,2) c <- c(.2,.25,.18,.2,.22) pars <- list(a,b,c) x <- drm(pars) plot(x) # Use theta values from -3 to 3 with an increment of 0.2 a <- c(.71,.96,.36,1.05,1.76,.64) b <- c(-.16,1.18,2.03,1.09,.82,-1.56) c <- c(.22,.17,.24,.08,.20,.13) theta <- seq(-3,3,.2) pars <- cbind(a,b,c) x <- drm(pars,theta) plot(x,combine=6,item.names="Items 1-6",auto.key=list(space="right"))