Confirmatory Factor Analysis (CFA)
Analyze → Dimension Reduction → Confirmatory Factor. Tests a hypothesized measurement structure: you say which observed indicators belong to which latent factors, and CFA tells you how well that structure fits your data. It is the confirmatory complement of Factor, which finds a structure — use Factor to explore, CFA to test what you (or the literature) already claim.
Typical uses: validating a questionnaire's subscales, checking that a published factor structure holds in your sample, or testing a measurement theory before building on it.
The dialog
Build the model factor by factor:
- Add factor creates a factor; give each a meaningful name (the names appear throughout the output).
- Tick each factor's indicators in its checklist. An indicator can belong to one factor only — once ticked in one factor it disappears from the others' lists. A factor needs at least two indicators (three when the model has only one factor).
- Each factor's first indicator sets its scale: its loading is fixed at 1, so it is the yardstick the factor is measured in. Pick a good, central indicator first per factor.
- Orthogonal factors (visible with two or more factors) forces the factor correlations to zero. Leave it off in most applications — real constructs correlate, and the correlated model reports how much.
- Modification indices adds a table of what would most improve the fit (below). The field beneath it sets the listing floor — by default 3.84, the χ² value with 1 df at the 5% level, so only indices that would be "significant" if freed are listed; enter 0 to see every candidate.
- Indicators: Continuous (ML) / Ordinal (WLSMV) chooses the estimator. Leave Continuous for measured scales; choose Ordinal for Likert-type items (integer-coded, each distinct value an ordered category, a dozen at most) — see Ordinal indicators below. The ordinal estimator is single-group and has no modification indices, so those controls step aside while it is selected.
- Group turns the run into a multi-group CFA: the same model is fitted in every group of the chosen variable (each distinct value is a group, in ascending order) with a mean structure, and measurement invariance is tested up the classic ladder. Invariance picks the highest level to fit — configural (same pattern, everything free), metric (equal loadings), scalar (equal loadings and intercepts; the default) or strict (equal residual variances too). Every level up to the chosen one is fitted and compared; the parameter tables then show the chosen level, group by group. Every group needs more complete cases than indicators. Modification indices are not offered for a multi-group model.
Reading the output
- CFA Model Fit — the headline table. The χ² test asks whether the model reproduces the observed covariances exactly (a significant result says it does not — but with large samples χ² flags even trivial misfit, which is why the descriptive indices beside it matter). Conventional rules of thumb, guides not laws: CFI/TLI ≥ 0.95 good, ≥ 0.90 acceptable; RMSEA ≤ 0.06 good, ≤ 0.08 acceptable (read its 90% CI, not just the point value); SRMR ≤ 0.08. Judge the set together and against your field's standards, not any single index against a cliff. The note beneath records how the model was estimated and how many iterations it took.
- CFA Loadings — each indicator's loading on its factor, with a standard error, z and significance for the free ones (the reference indicator shows its fixed 1 and dashes — it was not estimated). The Standardized column is the completely standardized solution: roughly, the indicator-factor correlation. Standardized loadings around 0.7+ mean the factor explains about half the indicator's variance; clearly weak loadings suggest the indicator does not measure that factor.
- CFA Factor Correlations — how strongly the latent factors correlate (only with two or more correlated factors). Correlations near ±1 are a warning: two "factors" may really be one.
- CFA Variances — the factor variances and each indicator's residual (unique) variance, with standard errors.
- CFA Modification Indices (on request) — one row per fixed
parameter that could be freed: a cross-loading (
visual → x9: an indicator on a factor it does not belong to), a residual covariance (x7 ↔ x8: two indicators sharing something beyond their factors) or, with orthogonal factors, a factor covariance. MI is the expected drop in the model χ² (1 df) from freeing that one parameter — the larger, the more that restriction is costing the fit — with its significance; EPC is the value the parameter is expected to take if freed, and Std. EPC the same in standardized units (a standardized loading, a residual correlation or a factor correlation), which tells you whether the change would be substantively large, not just significant. Rows are sorted largest first and cut at the floor you set; within-factor residual covariances of an orthogonal model are not listed because freeing them would not be identified. Read them as hints, not instructions: the indices are computed one at a time from the current model, they capitalize on chance in your sample, and a cross-loading or correlated residual should only be freed when it makes theoretical sense (two items with near-identical wording, say). A model respecified from its modification indices is exploratory — confirm it on new data.
Multi-group models and measurement invariance
Before comparing factor means or loadings between groups — two schools, two countries, men and women — you have to show that the instrument measures the same thing the same way in each group; otherwise a difference in means may be a difference in what the items mean. The multi-group run answers this with the nested sequence of models in CFA Invariance Tests, one row each:
- Configural — the same pattern of loadings in every group, all parameters free. If this already fits poorly, the groups do not share a structure and the ladder stops here.
- Metric (+ equal loadings) — the factors are measured on the same scale in each group. Required before comparing relationships (factor correlations, regressions) across groups.
- Scalar (+ equal intercepts) — the items have the same origin too, so latent means can be compared. The first group (lowest value) is the reference with means fixed at 0; the CFA Latent Means table gives the other groups' means relative to it, with standard errors and tests.
- Strict (+ equal residual variances) — the items are equally precise in each group; rarely required in practice, reported for completeness.
Each row carries the full fit block and, from the second row on, the Δ columns against the model one step up: the Δχ² test of the added constraints (a significant value says the constraint hurts) and ΔCFI and ΔRMSEA. The common rule of thumb — a CFI drop of more than about .01 signals that invariance fails at that level — is guidance, not a law; χ² is sample-size sensitive, so read the two together. If invariance fails at a level, the honest report is the last level that held (and the comparisons it licenses), or a partial invariance model freeing the offending item — which is outside this dialog's scope.
The parameter tables (Loadings, Factor Correlations, Variances, Intercepts and, from scalar on, Latent Means) show the chosen level per group; a parameter constrained equal shows the same estimate and standard error in every group, and the standardized loadings are standardized within each group. Factor variances and covariances are always free per group. The multi-group fit measures follow lavaan's definitions (RMSEA and its CI scaled for the number of groups; SRMR the size-weighted average over groups with mean residuals included), so they read the same way as lavaan's.
Ordinal indicators (WLSMV)
Likert items are not continuous: a 1–5 response is a coarsened slice of an underlying continuous agreement, and fitting the ML model to the items' ordinary covariances pulls the loadings toward zero and distorts the fit. Ordinal (WLSMV) — lavaan's and Mplus's default for ordered items — fits the model to the items' polychoric correlations instead:
- Thresholds — each item's cut points on its underlying standard-normal
response, estimated from the cumulative proportions in each category
(CFA Thresholds:
t1 (1 | 2)separates category 1 from 2, and so on), with standard errors. - Polychoric correlations — the correlations the underlying continuous responses would have (CFA Polychoric Correlations, the matrix the model was fitted to).
- Estimation — diagonally weighted least squares on that correlation structure; the loadings are on the underlying responses (each with unit variance, so the standardized loading is the loading times the factor's standard deviation), with robust standard errors; the residual variances are implied (1 minus the item's communality) and carry no standard error.
- Fit — the Model Fit row shows the mean-and-variance-adjusted (scaled-shifted) χ², the statistic whose p-value is trustworthy under this estimator, and the CFI, TLI and RMSEA computed from it — lavaan's "scaled" column — plus SRMR. The note records the unscaled statistic and the scaling constants, so the result can be matched against other software line by line. The usual cut-offs are read the same way as for ML, with the usual caveats.
Every indicator is treated as ordinal under this estimator; mixed models (some continuous items) are not offered. Very many categories (more than twelve) are refused with advice to use ML.
When something is wrong, it says so
CFA is an iterative estimation, and this dialog treats its failure modes as information, never as silent numbers:
- Identification errors stop the analysis with a message naming the offending factor (too few indicators, an impossible parameter count). Fix the model rather than the data.
- A Heywood case — a residual variance driven to its lower bound — is flagged by name in the notes. It usually signals a misspecified model, a weak factor, or too small a sample.
- Non-convergence and suspected local optima are reported in the Model Fit note. Treat the estimates with caution and simplify the model or check the indicators.
- A singular information matrix (the model is empirically underidentified for these data) is stated plainly, and standard errors are withheld rather than printed as nonsense.
How this is computed
This section names which method each procedure prints — the estimator, the statistic, its degrees of freedom, and the tie, missing-value and weight rules — and links the recorded convention that explains the choice. The full index is the convention inventory; every number here is validated against independent packages per the validation suite.
- The estimator — maximum likelihood on the sample covariance with divisor N; each factor's first indicator is the marker (loading fixed at 1), factor variances free; χ² = N·F (lavaan's N convention); standard errors from the expected information; CFI / TLI against the independence baseline; the RMSEA interval is 90 % from the noncentral χ²; SRMR over the lower triangle including the diagonal (CFA conventions · second oracle).
- Modification indices — the 1-df score test of each fixed parameter, with the expected parameter change (MI).
- Multi-group invariance — configural, metric, scalar and strict, tested by Δχ² and reported with ΔCFI (multi-group).
- Ordinal indicators (WLSMV) — polychoric correlations from two-step ML thresholds, the diagonally-weighted fit, the (N − 1)·F statistic lavaan uses for WLS (WLSMV).
- Weights and missing data — listwise complete cases; a frequency weight enters the covariance as replication (case weighting).
Reproducibility
A run journals a compact syntax command, e.g.:
cfa model="Verbal: v1 v2 v3; Speed: v4 v5 v6"
with orthogonal=true recorded when set, modification_indices=true
(plus mi_minimum=… when the floor was changed from 3.84) when the table
was requested, group=site (plus invariance=metric or another level
when changed from the scalar default) for a multi-group run, and
estimator=wlsmv for ordinal indicators — re-running reproduces the same
tables. The same tool is available to the AI
assistant, MCP and batch scripts.
Scope: simple structure (one factor per indicator); continuous indicators by maximum likelihood — single-group with modification indices on request, or multi-group with invariance testing up to strict — or ordinal indicators by WLSMV (single-group). Mixed continuous/ordinal models, multi-group WLSMV, partial invariance and regression paths between factors (SEM territory) stay out. Validated against lavaan on the classic Holzinger–Swineford example — continuous, multi-group and ordinal — see the validation suite.