Learn R Programming

bairt (version 0.1.2)

irc.bairt: Plot of posterior density of the item response curve

Description

Plot of the j-th item response curve.

Usage

# S3 method for bairt
irc(mcmclist, item = 1, color = "red", prob = c(0.05,
  0.95), ...)

Arguments

mcmclist

A mcmc.2pnob or mcmc.3pnob class object.

item

The number of j-th item.

color

Item response curve color.

prob

A vector of length two for defined the percentiles of the posterior density.

...

Further arguments.

Value

Plot of the j-th item response curve.

Details

The solid line corresponds to the location of the posterior mean and the points correspond to the percentiles determined by prob. prob = c(0.05, 0.95) corresponds to the 5th and 95th percentils of the posterior density respectively.

References

Johnson, V. E. & Albert, J. H. (1999). Ordinal Data Modeling. New York: Springer.

See Also

mcmc.2pnob, mcmc.3pnob and continue.mcmc.bairt.

Examples

Run this code
# NOT RUN {
# data for model
data("MathTest")

# Only for the first 500 examinees of the data MathTest
# Two-Parameter Normal Ogive Model
model2 <- mcmc.2pnob(MathTest[1:500,], iter = 400, burning = 100)
check.plot(model2)
irc(model2, item = 3)

# }
# NOT RUN {
# For all examinees of the data MathTest
# Three-Parameter Normal Ogive Model
# selection of the prior for 5 response options
cprior <- select.c.prior(5)
modelAll3 <- mcmc.3pnob(MathTest, iter = 1000, burning = 0,
                    c.prior = cprior)
irc(modelAll3 , item = 1, color = "blue")
irc(modelAll3 , item = 1, color = "blue", prob = c(0.1, 0.9))
# }
# NOT RUN {
## End(Not run)


# }

Run the code above in your browser using DataLab