ostudy: Item Option Study

View source: R/ostudy.R

ostudyR Documentation

Item Option Study

Description

Functions for analyzing distributions of unscored item responses by ability, also known as distractor analysis.

Usage

ostudy(
  x,
  groups,
  scores,
  cuts = c(0, 1/3, 2/3, 1),
  key,
  labels = c("low", "mid", "high"),
  itemid = colnames(x),
  filename,
  sep = ","
)

Arguments

x

matrix or data.frame of unscored item responses.

groups

optional grouping variable as a vector with length nrow(x). When cuts are given, groups are created by comparing scores to cuts.

scores

optional vector of scores defining the ability or trait levels of respondents. When key is provided, scores are calculated by first scoring item responses in x.

cuts

vector of cut scores used to define groups.

key

vector of keyed responses, one per column in x.

labels

character vector for labeling groups in output, with length length(groups).

itemid

vector of labels for items, defaulting to column names in x, if present, otherwise "Item1", "Item2", etc.

filename

optional path to file where output will be written.

sep

character string used to separate output in written file.

Value

Returns three lists of distractor analysis tables, one per item, all stored within a larger list. These lists are counts for raw frequencies, rowpct for percentages by row, and colpct for percentages by column. Each table within each of these lists contains the distribution of unscored item responses by group.


talbano/epmr documentation built on May 1, 2024, 11:10 a.m.