#As a call from wrightMap:
## Mock results
uni.proficiency <- rnorm(1000, mean = -0.5, sd = 1)
items.loc <- sort(rnorm(20))
thresholds <- data.frame(
l1 = items.loc - 0.5,
l2 = items.loc - 0.25,
l3 = items.loc + 0.25,
l4 = items.loc + 0.5
)
## Setting up labels, colors, and symbols
thresholds.labels <- data.frame(
l1 = paste('Lev', rep(1, 20), sep = ''),
l2 = paste('Lev', rep(2, 20), sep = ''),
l3 = paste('Lev', rep(3, 20), sep = ''),
l4 = paste('Lev', rep(4, 20), sep = '')
)
thresholds.colors <- data.frame(
l1 = rep('green', 20),
l2 = rep('red', 20),
l3 = rep('yellow', 20),
l4 = rep('blue', 20)
)
thresholds.symbols <- data.frame(
l1 = rep(15, 20),
l2 = rep(16, 20),
l3 = rep(17, 20),
l4 = rep(18, 20)
)
wrightMap(uni.proficiency, thresholds,
thr.lab.text = thresholds.labels,
thr.lab.col = as.vector(as.matrix(thresholds.colors)),
thr.sym.pch = thresholds.symbols
)
# Direct call:
## Plotting results of a unidimensional Rating Scale Model
items.loc <- sort(rnorm(20))
thresholds <- data.frame(
l1 = items.loc - 0.5,
l2 = items.loc - 0.25,
l3 = items.loc + 0.25,
l4 = items.loc + 0.5
)
itemModern(thresholds)
itemClassic(thresholds)
itemHist(thresholds)
Run the code above in your browser using DataLab