Wald test that coefficient alpha is equal across two or more [alpha()] fits (or, with a single fit, equal to `value`). See [kappa_test()] for the `paired` semantics; `alpha` is the only coefficient, so there is no `coef` argument.
Examples
# Do the three Holzinger-Swineford (1939) subscales have equal reliability?
# The same students take all three, so the fits are paired (G-way, df = 2).
subs <- list(visual = c("x1", "x2", "x3"),
textual = c("x4", "x5", "x6"),
speed = c("x7", "x8", "x9"))
fits <- lapply(subs, function(v)
alpha(dat.holzinger1939[, v], estimator = "nt_fiml"))
do.call(alpha_test, c(fits, list(paired = TRUE)))
#>
#> Paired (dependent) test of equal alpha across 3 fits
#>
#> data: visual, textual, speed
#> X-squared = 75.994, df = 2, p-value < 2.2e-16
#> sample estimates:
#> visual textual speed
#> 0.6261171 0.8827069 0.6884550
#>
# Real missing data with groups: psych::bfi. The same 2800 respondents take
# all five Big Five scales; reverse-key the negatively-worded items first.
data(bfi, package = "psych")
neg <- c("A1", "C4", "C5", "E1", "E2", "O2", "O5")
bfi[neg] <- 7 - bfi[neg]
# Dependent: are Neuroticism and Extraversion equally reliable? The same
# respondents answer both, so the estimates are paired.
N <- paste0("N", 1:5)
E <- paste0("E", 1:5)
alpha_test(N = alpha(bfi[, N], estimator = "nt_fiml"),
E = alpha(bfi[, E], estimator = "nt_fiml"),
paired = TRUE)
#>
#> Paired (dependent) test of equal alpha across 2 fits
#>
#> data: N, E
#> X-squared = 27.493, df = 1, p-value = 1.576e-07
#> sample estimates:
#> N E
#> 0.8138131 0.7615000
#>
# Independent: is Conscientiousness equally reliable across the two genders?
g <- split(seq_len(nrow(bfi)), bfi$gender)
C <- paste0("C", 1:5)
alpha_test(
men = alpha(bfi[g[["1"]], C], estimator = "nt_fiml"),
women = alpha(bfi[g[["2"]], C], estimator = "nt_fiml"),
paired = FALSE)
#>
#> Independent-sample test of equal alpha across 2 fits
#>
#> data: men, women
#> X-squared = 0.0082484, df = 1, p-value = 0.9276
#> sample estimates:
#> men women
#> 0.7249358 0.7231688
#>
