Description Usage Arguments Value Examples
psketto is singlular of psketti; (spaghetti <ā> spaghetto). This function plots the data for a single item from the output of 'pskettify()'. 'psketto()' is also used in 'psketti()' to create multiple ICC plots. Based on Asril and Marais (2011).
1 2 3 4 5 6 7 8 9 10 11 |
pskettified_data |
input data, generated using 'pskettify()'. |
item |
character name of the item to be plotted |
item.label |
a character string of the item name to use. |
style |
a character string for plotting style options are present for coloured, or print for black and white. Defaults to "present". |
IRFLocation |
logical, plots reference lines for Rasch IRF location. Defaults to 'TRUE' |
empCI |
logical, plots confidence intervals for empirical points, calculated using 'pskettify()'. Defaults to 'TRUE' |
empICC |
logical, plots empirical ICC for item. Defaults to 'TRUE' |
empPoints |
logical, plots empirical points for based on class intervals/score groups generated with 'pskettify()'. Defaults to 'TRUE' |
facet_curves |
logical, should the plot be faceted by category curve? Applies only to polytomous Rasch models. Defaults to 'FALSE',. |
psketto plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 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
# plot IRF in default colours
psk_1_present <- psketto(psk_data,
style = "present",
item = "i01",
item.label = "i01")
psk_1_present # plot output
# plot IRF in default greyscale colours
psk_1_print <- psketto(psk_data,
style = "print",
item = "i01",
item.label = "i01")
psk_1_print # plot output
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.