Site icon R-bloggers

WrightMap Tutorial 2

[This article was first published on R on WrightMap, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Plotting the items in different ways

Updated Fri 24-Apr-2020

Setup

We start by creating mock person and item estimates.

For the person proficiencies we create a single vector with 1000 values.

set.seed(2020)
mdim.sim.thetas <- matrix(rnorm(5000), ncol = 5)

Dealing with many, many items

What happens if you have too many items?

rasch2.sim.thresholds <- runif(50, -3, 3)

If we use the defaults…

wrightMap(rnorm(1000), rasch2.sim.thresholds)

Things do not look quite right.

Wright Map offers some options…

You can use the itemClassic or itemHist options for item.side.

wrightMap(rasch.sim.thetas, rasch2.sim.thresholds, item.side = itemClassic
    , item.prop = .5)

wrightMap(rasch.sim.thetas, rasch2.sim.thresholds, item.side = itemHist, item.prop = 0.5)

Or you can play with the way labels are presented:

wrightMap(rnorm(1000), rasch2.sim.thresholds, show.thr.lab = FALSE, label.items.srt = 45)

wrightMap(rnorm(1000), rasch2.sim.thresholds, show.thr.lab = FALSE, label.items.rows = 2)

wrightMap(rnorm(1000), rasch2.sim.thresholds, show.thr.lab = FALSE
    , label.items = c(1:50), label.items.rows = 3)

Or you can get rid of that axis completely

wrightMap(rnorm(1000), rasch2.sim.thresholds, show.thr.sym = FALSE
    , thr.lab.text = paste("I", 1:50, sep = ""), label.items = ""
    , label.items.ticks = FALSE)

To leave a comment for the author, please follow the link and comment on their blog: R on WrightMap.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.