kr20: Calculate KR-20 reliability coefficient

View source: R/utils.R

kr20R Documentation

Calculate KR-20 reliability coefficient

Description

Calculates the Kuder-Richardson 20 (KR-20) reliability coefficient for a data.frame or matrix of dichotomous (0/1) items.

Usage

kr20(m)

Arguments

m

A data.frame or matrix where rows are subjects and columns are dichotomously scored (0/1) items.

Value

A numeric value for the KR-20 coefficient, or NA_real_ if calculation is not possible.

Examples

item_matrix <- data.frame(
  m1 = c(1, 1, 0, 1),
  m2 = c(1, 0, 1, 1),
  m3 = c(0, 1, 0, 0)
)
kr20(item_matrix)

examly documentation built on Nov. 19, 2026, 5:11 p.m.