Reliability analysis (Cronbach's α and McDonald's ω).
An extension of jmv::reliability()
.
It reports (1) scale reliability statistics
(Cronbach's α and McDonald's ω) and
(2) item reliability statistics
(item-rest correlation [i.e., corrected item-total correlation]
and what Cronbach's α and McDonald's ω
would be if the item was dropped).
Three options to specify the variable list:
var + items
: use the common and unique parts of variable names.
vars
: directly define a variable list.
varrange
: use the start and end positions of a variable list.
Alpha(data, var, items, vars = NULL, varrange = NULL, rev = NULL)
data |
Data frame. |
var |
[option 1]
Common part across multiple variables (e.g., |
items |
[option 1]
Unique part across multiple variables (e.g., |
vars |
[option 2]
Character vector specifying a variable list (e.g., |
varrange |
[option 3]
Character with |
rev |
[optional] Reverse-scoring variables. It can be (1) a numeric vector specifying the positions of reverse-scoring variables (not recommended) or (2) a character vector directly specifying the variable list (recommended). |
A result object obtained from jmv::reliability()
.
# see ?psych::bfi Alpha(bfi, "E", 1:5) # "E1" & "E2" should be reverse scored Alpha(bfi, "E", 1:5, rev=1:2) # correct Alpha(bfi, "E", 1:5, rev=c("E1", "E2")) # also correct Alpha(bfi, vars=c("E1", "E2", "E3", "E4", "E5"), rev=c("E1", "E2")) Alpha(bfi, varrange="E1:E5", rev=c("E1", "E2")) # using dplyr::select() bfi %>% select(E1, E2, E3, E4, E5) %>% Alpha(vars=names(.), rev=c("E1", "E2"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.