pskettify: pskettify your data

Description Usage Arguments Value Examples

View source: R/pskettify.R

Description

This function extracts data from an eRm object of class 'RM' and converts to a format for plotting data. This also computes the empirical response values and empirical confidence intervals.

Usage

1
pskettify(eRm.obj, conf.level = 0.95, Theta.lwr = -6, Theta.upr = 6)

Arguments

eRm.obj

an eRm object of class 'RM'.

conf.level

the confidence level for empirical response curve. Defaults to 0.95.

Theta.lwr

The lowest limit of the latent dimension. Defaults to -6.

Theta.upr

The highest limit of the latent dimension. Defaults to 6.

Value

output_list containing presp and emp_ICC.

presp a data frame of ability (Theta) and conditional response probabilities to each item.

emp_ICC a dataframe containing proportion values and confidence intervals for ability class intervals to each item.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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

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