Learn R Programming

examly (version 0.2.0)

kr20: 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)

Value

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

Arguments

m

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

Examples

Run this code
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)

Run the code above in your browser using DataLab