# Directly from the standardized loadings a paper reports:
average_variance_extracted(loadings = c(.8, .7, .6))
# From a fitted model, one AVE per factor (requires lavaan).
data(holzinger_swineford)
fit <- lavaan::cfa(
"verbal =~ t6_paragraph_comprehension + t7_sentence +
t9_word_meaning
deduction =~ t20_deduction + t22_problem_reasoning +
t23_series_completion",
data = holzinger_swineford)
ave_tbl <- average_variance_extracted(fit)
ave_tbl
# The Fornell and Larcker (1981) discriminant criterion compares each
# factor's AVE with the squared correlation between the factors: a
# factor should account for more of its own indicators' variance than
# it shares with the other factor. Here the comparison favors verbal
# and goes against deduction, whose AVE falls below the shared
# variance. Fitting with cfa_k(..., output = "measurement") puts the
# AVE values and the latent correlations in one table.
lavaan::lavInspect(fit, "cor.lv")["verbal", "deduction"]^2
# The broom verbs: one row per factor.
generics::tidy(ave_tbl)
generics::glance(ave_tbl)
Run the code above in your browser using DataLab