reliability: Compute and report Cronbach's alpha

View source: R/alpha_functions.R

reliabilityR Documentation

Compute and report Cronbach's alpha

Description

Given a matrix x in which every column represents a variable, this function reports (a) the estimated reliability (Cronbach's alpha) for the battery of n variables, and (b) the estimated reliability for each possible combination of n - 1 variables. If x contains missing values, listwise deletion will be done via na.omit(x) so that alpha can be calculated.

Usage

reliability(x, ...)

Arguments

x

Matrix of numbers

...

additional arguments passed to var()

Value

The function prints output to the screen and invisibly returns a list with five elements:

  • nrowBeforeListwiseDeletion is the number of rows of x.

  • nrowAfterListwiseDeletion is the number of rows of x after listwise deletion.

  • alpha is Cronbach's alpha for x after listwise deletion.

  • alphaSmall is a vector of ncol(x) numbers. It shows what Cronbach's alpha is when we remove one variable at a time from na.omit(x).

  • alphaSmallAfterListwiseDeletion is a vector of ncol(x) numbers. It shows what Cronbach's alpha is when we remove one variable at a time from x and then use listwise deletion on the new matrix.

Author(s)

Peter Ellis

John G. Bullock

Examples

data(iris)
reliability(iris[, 1:4])


jbullock35/Bullock documentation built on April 1, 2022, 6:21 p.m.