Skip to contents

Estimates Cronbach's coefficient alpha for a subjects-by-items matrix of item scores with missing entries. Pick the estimator with `estimator`:

  • `"pairwise"` — pairwise-available covariance moments under MCAR, with an influence-function sandwich standard error;

  • `"cat_fiml"` — saturated-multinomial full-information maximum likelihood for finite-category items under ignorable missingness;

  • `"nt_fiml"` — robust normal-theory FIML (saturated Gaussian covariance by EM, sandwich delta-method SE) for continuous items under ignorable missingness.

For ordinal or otherwise categorical responses under `"pairwise"` or `"nt_fiml"`, either pass the scored numeric matrix directly or pass integer category codes with `values`; the observed categories are sorted and mapped to `values` before estimation.

All three estimators target fixed-item coefficient alpha. With missing entries, every item must be observed at least once and every item pair must be jointly observed by at least one subject. If that complete pairwise co-observation condition fails, alpha is not identified from the observed missing-data pattern and the fit errors before running the estimator.

Usage

alpha(
  x,
  estimator = c("pairwise", "cat_fiml", "nt_fiml"),
  values = NULL,
  em_options = list()
)

Arguments

x

A subjects-by-items numeric matrix or data frame; `NA` and other non-finite values indicate missing entries. For `estimator = "cat_fiml"`, entries are integer category codes.

estimator

One of `"pairwise"`, `"cat_fiml"`, or `"nt_fiml"`.

values

Optional numeric vector of scores for observed categories. When supplied, its length must equal the number of unique finite entries in `x`.

em_options

Named list tuning the EM fit for the likelihood estimators. For `"nt_fiml"`: `tol`, `max_iter`; `fd_h` is accepted for backward compatibility and ignored. For `"cat_fiml"`: `tol`, `max_iter`, `prune_tol`, `start_alpha`, `info_rcond` (the relative eigenvalue cutoff used when inverting Louis' observed information), and `flatten` (total Dirichlet pseudo-mass spread over the complete pattern table; any positive value makes the fitted table the unique interior posterior mode when the saturated likelihood is flat, at the cost of shrinking it toward uniform with weight `flatten / (n + flatten)`; `0`, the default, is strict ML). Flattening is a uniqueness device, not an inference upgrade: it leaves the point estimate essentially unchanged but makes the reported standard errors conservative (roughly 50% too wide in calibration), so leave it at `0` unless a unique reproducible fit matters more than SE sharpness. Pass any subset.

Value

An object of class `misskappa_estimate` carrying one coefficient named `alpha` and its asymptotic covariance matrix. Methods: `print`, `coef`, `vcov`, `confint`, `as.data.frame`, and `stats::influence`. The object also carries a `psi` component (the n-by-1 matrix of per-subject influence functions).

Examples

# Continuous item battery: the textual subscale of the Holzinger-Swineford
# (1939) data. Normal-theory FIML alpha, valid under ignorable missingness.
textual <- dat.holzinger1939[, c("x4", "x5", "x6")]
fit <- alpha(textual, estimator = "nt_fiml")
coef(fit)
#>     alpha 
#> 0.8827069 
confint(fit)
#>           2.5 %    97.5 %
#> alpha 0.8613549 0.9040589

# Real item-level missing data: the Neuroticism scale of psych::bfi
# (2800 respondents, ~360 with at least one missing item). The FIML
# estimator is valid under ignorable missingness.
data(bfi, package = "psych")
N <- paste0("N", 1:5)
alpha(bfi[, N], estimator = "nt_fiml")
#> misskappa: estimator=nt_fiml, weight=score
#>       estimate    se lower  upper
#> alpha   0.8138 0.006 0.802 0.8256