Learn R Programming

bairt (version 0.1.2)

parameter.plot.bairt: Graph of marginal posterior densities

Description

Graph of marginal posterior densities for the item parameters (a, b or c).

Usage

# S3 method for bairt
parameter.plot(mcmclist, items = NULL, parameter = NULL,
  prob = c(0.05, 0.95), ...)

Arguments

mcmclist

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

items

A vector to indicate the item to be plotted.

parameter

The parameter (a, b, c or theta) for graphing.

prob

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

...

Further arguments.

Value

Graph of posterior densities of the item parameter (a, b or c).

Details

Graph of marginal posterior densities of the item parameter a, b for mcmc.2pnob object or a, b, c for mcmc.3pnob object. The center of error bar corresponds to the marginal posterior mean and the extremes correspond to percentiles of the marginal posterior density (These are delimited by prob). For example, prob = c(0.05, 0.95) is equivalent to the 5th and 95th percentiles of the marginal posterior density.

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)
parameter.plot(model2)
parameter.plot(model2, items = c(2, 10:15))
parameter.plot(model2, items = 1:100, parameter = "theta" )

# }
# NOT RUN {
# For all examinees of the data MathTest
# Three-Parameter Normal Ogive Model
model3 <- mcmc.3pnob(MathTest, iter = 3500, burning = 500)
parameter.plot(model3)
parameter.plot(model3, items = c(2, 10:15))
parameter.plot(model3, items = 1:100, parameter = c("c", "theta"))
# }
# NOT RUN {
## End(Not run)

# }

Run the code above in your browser using DataLab