pskett_msq: Plot a Infit and Outfit MSQ

Description Usage Arguments Value Examples

Description

This function plots the Infit and Outfit MSQ values from a item of class ItemFit. see 'item_fit_table()'. Based on Yu (2020).

Usage

1
psketti_msq(x, style = "present")

Arguments

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".

Value

MSQ plot.

Examples

 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

SBGalvin/psketti documentation built on March 13, 2021, 1:47 p.m.