Learn R Programming

emreliability (version 1.0.0)

alpha: Cronbach's Coefficient Alpha

Description

Compute Cronbach's coefficient alpha and the associated standard error of measurement (SEM) for a set of items.

Usage

alpha(x)

Value

A named list with the following elements:

alpha

Cronbach's coefficient alpha.

sem

Standard error of measurement (SEM) based on alpha.

Arguments

x

A data frame or matrix containing item responses, with rows as respondents (subjects) and columns as items.

Details

Cronbach's alpha is an estimate of the internal consistency reliability of a test. This implementation:

  • removes rows with any missing values using stats::na.exclude(),

  • computes the sample covariance matrix of the items,

  • uses the classical formula $$\alpha = \frac{k}{k-1} \left(1 - \frac{\sum \sigma_i^2}{\sigma_X^2}\right),$$ where \(k\) is the number of items, \(\sigma_i^2\) are item variances, and \(\sigma_X^2\) is the variance of the total score,

  • computes SEM as \(\text{SD}(X) \sqrt{1 - \alpha}\).

Examples

Run this code
data(data.u)
alpha(data.u)

Run the code above in your browser using DataLab