psketto_simple: Unadorned Rasch IRF

Description Usage Arguments Examples

View source: R/psketto_simple.R

Description

Unadorned Rasch IRF

Usage

1
psketto_simple(x, item, all.item = FALSE, item.label = FALSE)

Arguments

x

an object of class pskettified

item

If you want to plot a single IRF, use this argument to state the name of the item.

all.item

Should all item IRF be plotted? Defaults to FALSE

item.label

Should the item labels be plotted? Defaults to FALSE

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

psk_data  <- pskettify(fake_rm)   # pskettify data
psketto_simple(psk_data, item = "i01")                       # single item IRF, no label
psketto_simple(psk_data, item = "i01", item.label = TRUE)    # single item IRF, labeled
psketto_simple(psk_data, item.label = TRUE, all.item = TRUE) # all item IRF labeled

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