classicaltest {classicaltest}R Documentation

Classical test theory item and person statistics

Description

Calculates several item and person statistics following ctitem(), and ctperson().

Usage

classicaltest(
  x,
  key,
  navalue = NA,
  wt = NULL,
  itemcategories = NULL,
  administered = NULL,
  itemscores = NULL,
  maxscore = NULL
)

Arguments

x

a data frame or matrix.

key

a vector or a list indicating the keys to score the data. If answers can only be right or wrong use a vector. If partial credits are allowed, use a list where the first element contains the keys for full credits, and next elements contain progressively the partial credit information. If a test has a combination of full credit and partial credit items, leave the full credit items as NAs in the keys for partial credit.

navalue

a single value indicating the score of NAs.

wt

a vector with total weights. Default is NULL.

itemcategories

a vector indicating all the possible categories for all items. If NULL, possible categories will be derived from data.

administered

a logical matrix indicating which items were administered. The dimensions should be the same as x. If NULL all items are considered administered.

itemscores

a numeric vector indicating all the possible scores for all items. If NULL, possible scores will be derived from data.

maxscore

a numeric value indicating which is the maximum score possible per item. The minimum score is assumed to be 0. If NULL the maximum score is assumed to be derived from the maximum value found in x or 1 if x only has 0s.

Value

A list with item and person statistics.

Examples

# Data preparation
## Random weights creation
set.seed(1919)
wt <- sample(x = 1:4, size = nrow(dichodata), replace = TRUE)

# Item and person analysis for multiple choice items
classicaltest(x = dichodata, key = dichokey, wt = wt)



[Package classicaltest version 0.7.5 Index]