ggWrightMap: Wright Map using ggplot

Description Usage Arguments Author(s) References See Also Examples

View source: R/ggWrightMap.R

Description

This function allows to generate Wright Map (also called item-person map) using ggplot function from package ggplot2 and plot_grid function from cowplot. Wright Map is used to display histogram of factor scores and the item difficulty parameters estimated by the Rasch IRT model.

Usage

1
ggWrightMap(theta, b, binwidth = 0.5, color = "blue", size = 15)

Arguments

theta

numeric: vector of ability estimates.

b

numeric: vector of difficulty estimates.

binwidth

numeric: the width of the bins of histogram.

color

character: color of histogram.

size

text size in pts.

Author(s)

Adela Drabinova
Institute of Computer Science, The Czech Academy of Sciences
Faculty of Mathematics and Physics, Charles University
[email protected]

Patricia Martinkova
Institute of Computer Science, The Czech Academy of Sciences
[email protected]

References

Wright, B. D., & Stone, M. H. (1979). Best test design.

See Also

wrightMap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
library(mirt)

# loading 100-item medical admission test data sets
data(dataMedical)
# binary data set
dataBin <- dataMedical[, 1:100]

# fit Rasch model with mirt package
fit <- mirt(dataBin, model = 1, itemtype = "Rasch")
# factor scores
theta <- as.vector(fscores(fit))
# difficulty estimates
b <- coef(fit, simplify = T)$items[, "d"]

ggWrightMap(theta, b)

## End(Not run)

patriciamar/ShinyItemAnalysis documentation built on Jan. 14, 2019, 8:53 p.m.