Learn R Programming

bruceR (version 0.6.0)

Alpha: Reliability analysis (Cronbach's \(\alpha\) and corrected item-total correlation).

Description

An extension of jmv::reliability.

Usage

Alpha(data, var, items, vars = NULL, rev = NULL)

Arguments

data

Data frame.

var

[option 1] Common part across multiple variables (e.g., "RSES", "SWLS").

items

[option 1] Unique part across multiple variables (e.g., 1:10).

vars

[option 2] Character vector specifying the variable list (e.g., c("x1", "x2", "x3")).

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).

Value

No return value.

See Also

jmv::reliability

Examples

Run this code
# NOT RUN {
?psych::bfi
Alpha(bfi, "E", 1:5)  # "E1" & "E2" should be reverse scored; see ?bfi
Alpha(bfi, "E", 1:5, rev=1:2)  # correct
Alpha(bfi, "E", 1:5, rev=c("E1", "E2"))  # also correct

# }

Run the code above in your browser using DataLab