Description Usage Arguments Details Value Author(s) See Also Examples
Returns Cronbach's alpha from a covariance matrix
1 |
sigma |
A square covariance or correlation matrix |
If a correlation matrix is provided rather than a covariance matrix, the result is a standardized Cronbach's alpha
Returns Standardized alpha when a correlation matrix is the input, and returns Raw alpha when a covariance matrix is input.
Ryne A. Sherman
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
data(RSPdata)
names(RSPdata)
# Forming a composite:
# We will first form a composite extraversion variable using
# BFI scores.
# Three items need to be reverse scored
sBFI6r <- 6 - RSPdata$sBFI6
sBFI21r <- 6 - RSPdata$sBFI21
sBFI31r <- 6 - RSPdata$sBFI31
# Now put them all into one data.frame
ext.vars <- data.frame(RSPdata$sBFI1, sBFI6r, RSPdata$sBFI11,
RSPdata$sBFI16, sBFI21r, RSPdata$sBFI26, sBFI31r, RSPdata$sBFI36)
head(ext.vars) # Looks good
# Get the internal consistency stats using the alpha() function in the
# psych package
alpha(ext.vars)
# We can also get alpha from the correlation/covariance matrices
alpha.cov(cor(ext.vars)) # Standardized Alpha
alpha.cov(cov(ext.vars)) # Raw Alpha
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.