evalPbc: Evaluate discrimination statistics

View source: R/evalPbc.r

evalPbcR Documentation

Evaluate discrimination statistics

Description

This function evaluates discrimination statistics for the categories of categorical variables, i.e. the correlations of each category with the total score on the test..

Usage

evalPbc(pbcs, mistypes = c("mnr", "mbd", "mir", "mbi"),
                    minPbcAtt = .05, maxPbcDis = .005, maxPbcMis = .07)

Arguments

pbcs

A data frame with the discrimination values for each category of categorical variables: output of catPbc. The data frame contains the following columns: item, cat, n, freq, freq.rel, catPbc, recodevalue, subunitType.

mistypes

Character or numeric vector. It will be checked, whether the missing types in this vector are defined for all items.

minPbcAtt

Numeric. Minimum correlation of attractors with total test score. If it is lower, the attractor will be flagged.

maxPbcDis

Numeric. Maximum correlation of distractors with total test score. If it is higher, the respective distractor will be flagged.

maxPbcMis

Numeric. Maximum correlation of missing with total test score. If it is higher, the respective missing type will be flagged.

Value

List. NULL (empty list) if everything is OK. Otherwise, returns list of character vectors containing the names of the flagged items:

zeroFreqAtt

Items with attractor frequency of zero.

zeroFreqDis

Items with distractor frequencies of zero.

lowMisPbcAtt

Items with too low (lower than minPbcAtt) or missing attractor correlations.

highPbcDis

Items with too high (higher than maxPbcDis) distractor correlations.

highPbcMis

Items with too high (higher than maxPbcMis) missing type correlations.

Author(s)

Karoline Sachse, Philipp Franikowski

Examples

data(inputDat)
data(inputList)

datRaw <- mergeData(newID = "ID", datList = inputDat, addMbd = TRUE)
datRec <- recodeData(datRaw, values = inputList$values,
    subunits=inputList$subunits)
pbcs   <- catPbc(datRaw, datRec, idRaw = "ID", idRec = "ID",
    context.vars = "hisei", values = inputList$values,
    subunits = inputList$subunits)
evalPbc(pbcs)

sachseka/eatPrep documentation built on June 9, 2025, 9:36 a.m.