Estimate scale reliability from item responses
Source:R/psychometrics.R
sframe_reliability_results.RdProduces Cronbach's alpha and McDonald's omega for each scale defined in the instrument, along with the number of items and sample size.
Arguments
- data
A
tibbleordata.frameof responses. Item columns must be present.- instrument
An
sframeobject.- scales
Character vector or NULL. A subset of scale IDs to analyse. When NULL (default), all scales in the instrument are included.
- alpha
Logical. Whether to compute Cronbach's alpha. Defaults to
TRUE.- omega
Logical. Whether to compute McDonald's omega. Defaults to
TRUE.
Value
An object of class sframe_reliability_report, a list with one
element per scale. Each element is a list of statistics and a summary
tibble.
Examples
# \donttest{
if (requireNamespace("psych", quietly = TRUE)) {
demo <- sframe_demo("tourism_services")
rr <- sframe_reliability_results(demo$responses, demo$instrument, omega = FALSE)
print(rr)
}
# }