Description Usage Arguments Value Examples
This function plots the Infit and Outfit MSQ values from a item of class ItemFit. see 'item_fit_table()'. Based on Yu (2020).
1 | psketti_msq(x, style = "present")
|
x |
input data, generated using 'item_fit_table()'. |
style |
a character string for plotting style options are present for coloured, or print for black and white. Defaults to "present". |
MSQ plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(eRm)
library(psketti)
data("FakeData") # load data
# restructure fake data
Fake_Data_scores <- reshape(FakeData[, c("ID", "Item", "X")],
timevar = "Item",
idvar = "ID",
direction = "wide")
# for eRm col names and row names
names(Fake_Data_scores) <- c("ID",
paste0("i",
sprintf(fmt = "%02d", 1:23)))
row.names(Fake_Data_scores) <- Fake_Data_scores$ID
Fake_Data_scores$ID <- NULL
fake_rm <- RM(Fake_Data_scores) # Estimate Rasch model
itemFit_psk <- item_fit_table(fake_rm) # item fit stats
MSQplot <- psketti_msq(itemFit_psk) # Plot infit and outfit
MSQplot
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.