grm-methods {plink} | R Documentation |
This function computes the cumulative probability of responding within or above a certain category or the probability of responding in a specific category for one or more items for a given set of theta values using the graded response model.
grm(x, cat, theta = seq(-4,4,0.05), catprob = FALSE, D = 1.7, location = FALSE, ...) ## S4 method for signature 'matrix', 'numeric' grm(x, cat, theta, catprob, D, location, ...) ## S4 method for signature 'data.frame', 'numeric' grm(x, cat, theta, catprob, D, location, ...) ## S4 method for signature 'list', 'numeric' grm(x, cat, theta, catprob, D, location, ...) ## S4 method for signature 'irt.pars', 'ANY' grm(x, cat, theta, catprob, D, location, ...) ## S4 method for signature 'sep.pars', 'ANY' grm(x, cat, theta, catprob, D, location, ...)
x |
ans R object containing item parameters. |
cat |
vector identifying the number of response categories (not the number of step parameters) for each item. |
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 |
catprob |
if TRUE , compute category probabilities instead of cumulative
probabilities |
D |
scaling constant (for the normal metric D = 1.7, for the logistic metric D = 1) |
location |
if TRUE , the step parameters are deviations from a difficulty
parameter |
... |
further arguments passed to or from other methods |
Returns an object of class irt.prob
Threshold parameters can be characterized in two ways: the actual thresholds or
deviations from an overall item difficulty (location). In the deviation scenario the
location
argument should be TRUE
and the location parameters should be
in the second column. The columns for the threshold/threshold deviation parameters
will always follow the discrimination and, if applicable, location columns. The number
of threshold/threshold deviation parameters can vary for each item. In these instances,
all cells with missing values should be filled with NA
s. For example, for a model
with no location parameter, if one item has five categories (four threshold parameters)
and another item has three categories (two threshol parameters), there should be five
columns. The first column includes the discrimination parameters and columns 2-5 include
the threshold parameters. The values in the last two columns for the item with three
categories should be NA
.
location
should be TRUE
and the location parameters should be in
the first column. The number of threshold/threshold deviation parameters can vary for
each item. In these instances, all cells with missing values should be filled with
NA
s (See the example in the method for x = "matrix"). "irt.pars"
. If x
contains
dichotomous items or items associated with another polytomous model, a warning will be
displayed stating that probabilities will be computed for the grm items only. If x
contains parameters for multiple groups, a list of "irt.prob"
objects will be returned.sep.pars
. If x
contains
dichotomous items or items associated with another polytomous model, a warning will be
displayed stating that probabilities will be computed for the grm items only.Jonathan P. Weeks weeksjp@gmail.com
Embretson, S. E., & Reise, S. P. (2000) Item Response Theory for Psychologists. Mahwah, New Jersey: Lawrence Erlbaum Associates
Kolen, M. J. & Brennan, R. L. (2004) Test Equating, Scaling, and Linking (2nd ed.). New York: Springer
Samejima, F. (1969) Estimation of latent ability using a response pattern of graded scores. Psychometrika Monograph, No. 17
Samejima, F. (1996) The graded response model. In W. J. van der Linden & Hambleton, R. K. (Eds.) Handbook of Modern Item Response Theory (pp. 85-100). New York: Springer-Verlag
mixed:
compute probabilities for mixed-format items
plot:
plot item characteristic/category curves
irt.prob
, irt.pars
, sep.pars:
classes
## Item parameters from Embretson & Reise (2000, p. 101) items 9-11 ## Cumulative probabilities # Includes a location parameter a <- c(2.09,1.18,1.69) b <- matrix(c(-1.07,-1.03,.39,.86,1.78,1.85,-.87,-.39,.31,NA,-1.4,-.42,NA,NA,-1.74),3,5) pars <- cbind(a,b) rownames(pars) <- paste("Item",9:11,sep=" ") colnames(pars) <- c("a","b",paste("c",1:4,sep="")) cat <- c(3,4,5) x <- grm(pars,cat,location=TRUE) plot(x) ## Category probabilities # Does not include a location parameter a <- c(2.09,1.18,1.69) b <- matrix(c(-1.93,-2.81,-1.46,-.2,-.64,.08,NA,.37,.81,NA,NA,2.13),3,4) pars <- cbind(a,b) rownames(pars) <- paste("Item",9:11,sep=" ") colnames(pars) <- c("a",paste("b",1:4,sep="")) cat <- c(3,4,5) x <- grm(pars,cat,catprob=TRUE) plot(x) ## Item parameters from Kolen & Brennan (2004, p. 210) ## Cumulative probabilities for a single item # Use theta values from -3 to 3 with an increment of 0.5 pars <- t(c(1.2,-.5,.6,1.1,1.3)) x <- grm(pars,5,theta=seq(-3,3,.05)) plot(x,item.lab=FALSE) ## Category probabilities for a single item pars <- t(c(1.2,-.5,.6,1.1,1.3)) x <- grm(pars,5,seq(-3,3,.05),catprob=TRUE) plot(x,item.lab=FALSE) ## Create sep.pars object then compute category probabilities a <- c(2.09,1.18,1.69) b <- matrix(c(-1.93,-2.81,-1.46,-.2,-.64,.08,NA,.37,.81,NA,NA,2.13),3,4) pars <- cbind(a,b) cat <- c(3,4,5) pm <- as.poly.mod(3,"grm") out <- sep.pars(pars,cat,pm) x <- grm(out,catprob=TRUE) plot(x)