#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
## Default labels are 1, 2, 3, etc.
items.loc <- sort(rnorm(20))
thresholds <- cbind(
items.loc - 0.5,
items.loc - 0.25,
items.loc + 0.25,
items.loc + 0.5
)
rownames(thresholds) <- paste0("Item", 1:20)
itemModern(thresholds) # Default: 1, 2, 3, 4
itemModern(thresholds, thr.lab.type = "transition") # Transition: 0/1, 1/2, 2/3, 3/4
itemClassic(thresholds) # Default: 1, 2, 3, 4
itemClassic(thresholds, label.steps.type = "transition") # Transition: 0/1, 1/2, 2/3, 3/4
itemHist(thresholds)
Run the code above in your browser using DataLab