Learn R Programming

xxIRT (version 1.1.0)

irt: IRT Object

Description

irt creates an IRT object with given values

gen.rsp generates binary/dichotomous responses for a given IRT object

plot plots probability/information fuctions for items in an IRT object

Usage

irt(theta, a, b, c, rsp = NULL)
gen.rsp(x)
"plot"(x, ...)

Arguments

theta
a vector of ability parameters
a
a vector/number of a parameters (item discrimination)
b
a vector of b parameters (item difficulty)
c
a vector/number of c parameters (item pseudo-guesing)
rsp
a response matrix (optional)
x
an IRT object
...
other arguments, e.g., type, total, items

Value

irt an irt objectplot returns a ggplot2 object

Details

An irt object contains thetas and item parameters as well as an optional repsonse matrix. D=1.7 by default. set a=.588 for Rasch items.

See Also

Other commons: gen.irt, prob

Other commons: gen.irt, prob

Other commons: gen.irt, prob

Examples

Run this code
# create an IRT object without responses
irt(rnorm(10), a=c(.8, 1.0, 1.2), b=c(-.5, 0, .5), c=0)
# create an IRT object with responses
irt(rnorm(10), a=1, b=rnorm(5), c=0, rsp=matrix(round(runif(50)),nrow=10,ncol=5))
# generate responses
gen.rsp(gen.irt(10, 5))
# plot TCC
plot(gen.irt(10, 5))
# plot ICCs
plot(gen.irt(10, 5), total=FALSE) 
# plot TIF
plot(gen.irt(10, 5), type="information") 
# plot IIFs
plot(gen.irt(10, 5), type="information", total=FALSE)

Run the code above in your browser using DataLab