Learn R Programming

EFAtools (version 0.8.0)

efa_reliability: Reliability and common-variance coefficients for a factor solution

Description

Computes model-based reliability coefficients (McDonald's omega total, hierarchical, and subscale; standardized Cronbach's alpha; and the H index) together with the bifactor common-variance indices (explained common variance, ECV, and percent of uncontaminated correlations, PUC) for the general factor and each group factor, and returns them as a tidy, long-format table. The coefficients can be obtained from a Schmid-Leiman solution (SL() or psych::schmid()), an oblique EFA() (correlated-factors) solution, a lavaan single-factor, second-order, or bifactor fit, a raw bifactor loading matrix, or manually supplied components.

Usage

efa_reliability(
  model = NULL,
  coefficients = NULL,
  g_name = "g",
  group_names = NULL,
  factor_map = NULL,
  variance = c("correlation", "sums_load"),
  var_names = NULL,
  fac_names = NULL,
  g_load = NULL,
  s_load = NULL,
  u2 = NULL,
  cormat = NULL,
  pattern = NULL,
  Phi = NULL
)

Value

An object of class efa_reliability: a long-format data frame with one row per computed coefficient, with columns

coefficient

the coefficient name (e.g. "omega_total").

level

"general" for the general-factor row, "group" otherwise.

factor

the factor label ("g" for the general factor).

group

the group label, or NA for a single ungrouped solution.

value

the coefficient value.

Structurally undefined cells (for example ECV and PUC on a group factor) are omitted. The object carries a settings attribute (the total-variance convention used) and a kind attribute tagging each coefficient as a reliability coefficient or a common-variance index, and has a print()

method.

Arguments

model

a SL(), schmid (psych::schmid()), EFA() (oblique), or lavaan object; a raw bifactor loading matrix (general factor first); or NULL to supply the components manually via g_load, s_load, u2, and var_names.

coefficients

character. An optional subset of the coefficients to return, any of "omega_total", "omega_hierarchical", "omega_subscale", "alpha", "H", "ECV", and "PUC". Default NULL returns all of them.

g_name

character. The name of the general factor in the lavaan solution. Only needed for a lavaan second-order or bifactor fit. Default is "g".

group_names

character. An optional vector of group names for a lavaan multiple-group fit. Its length must match the number of groups.

factor_map

matrix. A logical or 0/1 matrix indicating which variable corresponds to which group factor, with the same dimensions as the group loading matrix (cross-loadings are allowed). If NULL (default), each variable is assigned to the group factor on which it loads most strongly. Not used for lavaan input.

variance

character. The total-variance denominator for the coefficients: "correlation" (default) takes it from the correlation matrix (the observed-score omega, as in psych::omega()); "sums_load" uses the model-implied composite variance from the squared loading sums and the uniquenesses (see OMEGA()), which needs no correlation matrix and so is the way to score a bare loading matrix or manual components given without one. Some inputs fix the convention: lavaan is always model-implied and an oblique EFA() is always correlation-based.

var_names

character. Subtest names in the row order of the loadings. Only needed when model is NULL.

fac_names

character. An optional vector of group-factor names in the column order of the loadings. Taken from the input if NULL.

g_load

numeric. General-factor loadings. Only needed when model is NULL.

s_load

matrix. Group-factor loadings. Only needed when model is NULL.

u2

numeric. Uniquenesses. Only needed when model is NULL (or to override the communality-based default for a raw bifactor matrix).

cormat

matrix. A correlation matrix used when variance = "correlation". If NULL, it is taken from the input object or reconstructed from pattern and Phi where possible (see OMEGA()).

pattern

matrix. Pattern coefficients from an oblique solution, used with Phi to reconstruct cormat when model is NULL and no cormat is given.

Phi

matrix. Factor intercorrelations from an oblique solution, used with pattern.

Details

Coefficients

The reliability coefficients are McDonald's omegas (McDonald, 1978, 1985, 1999), standardized Cronbach's alpha (Cronbach, 1951), and the H index (construct replicability; Hancock & Mueller, 2001). The common-variance indices are the ECV and PUC (Bonifay et al., 2015; Reise et al., 2013; Rodriguez et al., 2016a, 2016b); they describe the general factor and so are reported for the general factor only. See OMEGA() for the definition and interpretation of each coefficient.

Input

The dispatch on model mirrors OMEGA(), with two additions: an oblique EFA() object is scored as the correlated-factors model it is (having no general factor, it omits the bifactor indices -- omega hierarchical, ECV, and PUC), and a bare loading matrix is read as a raw bifactor solution (general factor in the first column). For a correlated-factors EFA() solution variance is always "correlation". The indicator-to-factor correspondences come from factor_map when it is supplied; otherwise each variable is assigned to the group factor on which it loads most strongly. For lavaan input the composite variances are model-implied (variance is not used), and the coefficients are computed per group.

See Also

OMEGA() for the same coefficients in a wide, per-factor layout.

Other reliability coefficients: print.efa_reliability()

Examples

Run this code
## From an oblique EFA (correlated-factors) solution. With no factor_map, each
## item is auto-assigned to its highest-loading factor.
efa_mod <- EFA(test_models$baseline$cormat, N = 500, n_factors = 3,
               type = "EFAtools", method = "PAF", rotation = "promax")
efa_reliability(efa_mod)

## From a Schmid-Leiman solution, with an explicit indicator-to-factor map.
sl_mod <- SL(efa_mod, type = "EFAtools", method = "PAF")
fc <- sl_mod$sl[, c("F1", "F2", "F3")] >= .2
efa_reliability(sl_mod, factor_map = fc)

## Request a subset of the coefficients only.
efa_reliability(sl_mod, factor_map = fc,
                coefficients = c("omega_total", "alpha"))

## From a lavaan bifactor solution.
# \donttest{
if (requireNamespace("lavaan", quietly = TRUE)) {
mod <- 'F1 =~ V1 + V2 + V3 + V4 + V5 + V6
        F2 =~ V7 + V8 + V9 + V10 + V11 + V12
        F3 =~ V13 + V14 + V15 + V16 + V17 + V18
        g =~ V1 + V2 + V3 + V4 + V5 + V6 + V7 + V8 + V9 + V10 + V11 + V12 +
             V13 + V14 + V15 + V16 + V17 + V18'
fit <- lavaan::cfa(mod, sample.cov = test_models$baseline$cormat,
                   sample.nobs = 500, estimator = "ml", orthogonal = TRUE)
efa_reliability(fit, g_name = "g")
}
# }

Run the code above in your browser using DataLab