What it is
Confirmatory factor analysis (CFA) is a structural equation modelling technique that tests a pre-specified measurement model against observed data. Unlike exploratory factor analysis, which discovers the factor structure from the data, CFA starts with a defined structure — a specific number of factors, with specific items assigned to specific factors — and tests how well that structure reproduces the observed covariance matrix of the items.
CFA is the appropriate method when a measurement model has been established through prior EFA or theory, and the researcher wants to verify that it holds in a new sample, a new cultural context, or a different wave of data collection. It answers the question: “Given that I have specified this factor structure, does the data support it?”
When to use it
CFA is appropriate when: a scale has been developed and validated in one context and is being used in another; a measurement model established through EFA needs to be confirmed in a new sample; or when testing whether the same factor structure holds across groups (measurement invariance).
In development economics field research, CFA is used to validate imported psychological scales (self-efficacy, depression, locus of control) in low-income country contexts, to test whether empowerment indices developed in one region perform equivalently in another, and as the measurement component of structural equation models that relate latent constructs to outcomes.
Measuring learning outcomes with a validated battery that is being used across multiple countries in a panel study requires CFA at each wave to confirm that the factor structure has not drifted over time.
CFA is less appropriate as a first-time analysis when no prior factor structure exists — EFA should precede it in the scale development process.
How it works
A CFA model specifies:
- Which items load on which factors (usually based on prior EFA or theory).
- Which cross-loadings are constrained to zero (items load on only one factor by default).
- Whether factors are allowed to correlate (oblique) or constrained to be orthogonal.
The model is estimated to find factor loadings, item intercepts, and residual variances that minimise the discrepancy between the model-implied covariance matrix and the observed covariance matrix. Maximum likelihood (ML) is the standard estimator for continuous items; WLSMV (weighted least squares mean and variance adjusted) is preferred for ordinal items.
Model fit indices. No single fit index is definitive; a combination is reported:
- CFI (Comparative Fit Index): values > 0.95 indicate good fit; > 0.90 adequate.
- RMSEA (Root Mean Square Error of Approximation): values < 0.06 indicate good fit; < 0.08 acceptable. Confidence interval should be reported.
- SRMR (Standardised Root Mean Square Residual): values < 0.08 indicate good fit.
- Chi-square test: formally tests exact fit; significant chi-square rejects exact fit, but the test is sensitive to sample size and almost always significant in large samples. Report the test statistic alongside CFI/RMSEA/SRMR.
Modification indices. If model fit is poor, modification indices suggest which parameters, if freed, would most improve fit. Modifications should only be made if theoretically justifiable — not as post-hoc data fishing. Any modifications made after initial specification must be reported and cross-validated.
Key decisions
Item assignment to factors. The prior factor structure from EFA or theory specifies which items load on which factor. Items with cross-loadings in the EFA solution — loading substantially on two factors — can either be assigned to the theoretically primary factor (with the cross-loading fixed to zero) or allowed a free cross-loading in the CFA. Free cross-loadings improve fit but complicate interpretation. Report the rationale for any deviation from strict simple structure.
Correlated residuals. When two items share content beyond the common factor — for example, two items that share a common phrase or refer to the same specific domain — their residuals may be correlated even after accounting for the factor. Freeing these residual correlations improves fit and is theoretically defensible when the source of correlation is identifiable. Freeing large numbers of residual correlations without theoretical justification is data mining.
Number of items per factor. Stable CFA parameter estimates require at least three items per factor; two items per factor produce identification problems. With only two items per factor, a two-factor model is not identified without constraints.
Estimator for ordinal items. For Likert-scale items, ML assumes multivariate normality, which is violated for ordinal data. WLSMV (in lavaan: estimator = "WLSMV") treats item responses as categorical and produces more accurate standard errors and fit statistics. Diagonally weighted least squares (DWLS) is an equivalent option in other software.
Caveats & common mistakes
Treating fit indices as pass/fail thresholds. Cutoff values (CFI > 0.95, RMSEA < 0.06) are guidelines, not laws. A model with CFI = 0.93 is not unambiguously “poor” if the substantive content of the items is appropriate and the loadings are strong. Fit should be interpreted alongside loadings, residual variances, and content validity.
Modifying the model to achieve fit. Applying modification indices until fit statistics meet thresholds produces an overfit model specific to the current sample. Any modifications must be reported, explained, and cross-validated. A model that only fits after extensive post-hoc modification provides weak evidence for the original theoretical structure.
Large sample sensitivity of chi-square. The chi-square goodness-of-fit test is sensitive to sample size: with N > 500, it will almost always reject the null hypothesis of exact fit even when approximate fit is good. Report chi-square/df ratio alongside CFI, RMSEA, and SRMR; the latter indices are less sensitive to sample size.
Confusing CFA with EFA. CFA tests a specified model; EFA discovers structure. Running an EFA on a scale and then immediately running a CFA on the same data to “confirm” the EFA structure is circular — the CFA will fit well because it is confirming a structure extracted from the same sample. Confirmation requires a new sample or a pre-specified model from a prior study.
Analysis Guide
# Two-factor model: factor 1 loads on items 1-5, factor 2 on items 6-10
# Structure is pre-specified from prior EFA or theory - CFA tests whether this specification fits the data
import pandas as pd
from semopy import Model, calc_stats
# 1. Specify the pre-defined two-factor measurement model — each factor is assigned its items based on prior EFA or theory; cross-loadings are constrained to zero by default (simple structure); factors are allowed to correlate (oblique solution) by default in semopy
model_desc = """
factor1 =~ item_1 + item_2 + item_3 + item_4 + item_5
factor2 =~ item_6 + item_7 + item_8 + item_9 + item_10
"""
# 2. Fit the CFA model using ML estimator — ML assumes multivariate normality; for ordinal Likert items with few categories, use WLS via obj="WLS" or treat items as ordinal in lavaan (see R tab)
model = Model(model_desc)
model.fit(df, obj="MLW")
print(model.inspect(std_est=True)) # parameter estimates with standardised loadings
# 3. Evaluate global model fit — CFI, RMSEA, SRMR, and chi-square assess how well the specified factor structure reproduces the observed item covariance matrix; no single index is decisive - inspect all four
stats = calc_stats(model)
print(stats[["CFI", "RMSEA", "SRMR", "chi2", "chi2 p-value", "DoF"]])
# 4. Inspect standardised factor loadings — on a 0-1 scale; loadings below 0.40 indicate items weakly tied to their assigned factor; all loadings should be statistically significant
loadings = model.inspect(std_est=True)
print(loadings[loadings["op"] == "~"]) # measurement loadings
# Note: semopy supports the full CFA workflow but lavaan (R) is more mature for modification
# indices, WLSMV for ordinal items, and reporting conventions. For complex SEM, see the R tab. Reading the output
- CFI > 0.95 indicates good fit; > 0.90 is acceptable. CFI below 0.90 means the specified factor structure does not adequately reproduce the observed item correlations.
- RMSEA < 0.06 indicates good fit; < 0.08 is acceptable. Report the 90% confidence interval: an upper bound above 0.08 raises concern even if the point estimate is acceptable.
- SRMR < 0.08 indicates good fit. SRMR is the average standardised residual between observed and model-implied correlations — values above 0.10 indicate systematic misfit.
- Chi-square will be significant in most samples larger than 200; report it alongside CFI/RMSEA/SRMR but do not use it as the primary fit criterion.
- Standardised factor loadings below 0.40 indicate an item is weakly related to its assigned factor; loadings above 0.70 are strong. All loadings should be statistically significant.
- Modification indices suggest which additional paths would most improve fit. Only free a path if there is a theoretical justification — post-hoc modifications that improve fit without theory are data mining and must be cross-validated in a new sample.
References
Brown, T. A. (2015). Confirmatory Factor Analysis for Applied Research (2nd ed.). Guilford Press.
Hu, L., & Bentler, P. M. (1999). Cutoff criteria for fit indexes in covariance structure analysis: Conventional criteria versus new alternatives. Structural Equation Modeling, 6(1), 1–55. https://doi.org/10.1080/10705519909540118
Kline, R. B. (2016). Principles and Practice of Structural Equation Modeling (4th ed.). Guilford Press.
Rosseel, Y. (2012). lavaan: An R package for structural equation modeling. Journal of Statistical Software, 48(2), 1–36. https://doi.org/10.18637/jss.v048.i02