View source: R/alpha_functions.R
| reliability | R Documentation |
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.
reliability(x, ...)
x |
Matrix of numbers |
... |
additional arguments passed to |
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.
Peter Ellis
John G. Bullock
data(iris) reliability(iris[, 1:4])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.