Discrepancy function¶
A scalar covariance-mismatch objective minimized when fitting a structural equation model.
Core Idea¶
In structural equation modeling, a discrepancy function turns a covariance-reproduction problem into a scalar optimization objective. It compares observed covariances S with those implied by a model Sigma(theta); estimation searches free parameters for a small value. The definition must state the fitting convention, because maximum likelihood and least-squares methods do not weight mismatch identically.
In an official lavaan confirmatory-factor-analysis example, a three-factor model on nine test indicators yields fmin 0.142 and a separately reported chi-square statistic of 85.306. These are different outputs of the same fitted analysis. A small minimum alone does not certify the psychological model, and a p-value is a subsequent inferential judgment rather than the fitting function itself.
How would you explain it like I'm…
The How-Far-Off Number
The Model Mismatch Score
Covariance Fitting Objective
Structural Signature¶
Sig role-phrases:
- Observed covariance — Supplies S, the empirical covariance target under a specified sample and variable order. It is constitutive. Counterfactual: Without an empirical target there is no model–data discrepancy.
- Model-implied covariance — Supplies Sigma(theta) predicted from a specified SEM structure and free parameters. It is constitutive. Counterfactual: A bare descriptive correlation table is not this fitted-model comparison.
- Fitting convention — Defines ML or another objective and its scale/assumptions. It is constitutive. Counterfactual: Changing the convention can change the scalar even for the same covariance pair.
- Scalar mismatch — Evaluates how far the selected model reproduces the observed covariance under that convention. It is constitutive. Counterfactual: A verbal opinion of fit without an evaluable objective is not a discrepancy function.
- Parameter search — Seeks a minimum over theta subject to model constraints. It is central. Counterfactual: A raw function value at arbitrary parameters is not the fitted minimum.
- Fit interpretation — Keeps Fmin, scaled test statistic, and broader adequacy judgment separate. It is central. Counterfactual: One scalar alone does not diagnose every kind of misspecification.
What It Is Not¶
- Not the chi-square test itself. A test statistic is constructed from a fitted discrepancy under additional assumptions.
- Not model truth. Minimizing covariance mismatch cannot by itself establish causal interpretation.
- Not any statistical distance. The typed carrier is observed versus SEM-implied covariance.
- Not directly comparable across all estimators. Scaling and weighting conventions differ.
- Closest near-miss. The scale and assumptions differ among ML, GLS, WLS, robust corrections, and missing-data estimators; zero means exact reproduction only under the chosen objective.
Scope of Application¶
- Confirmatory factor analysis. Estimate constrained measurement models and examine reproduced covariances.
- Path and SEM models. Optimize covariance fit under structural restrictions.
- Method comparison. Specify how different fitting functions weight residuals.
- Model diagnostics. Use the minimized objective alongside residuals and substantive theory.
Clarity¶
A discrepancy function is a rule for scoring the gap between the covariances a structural equation model predicts and those observed in data. Parameters are fitted to make this score small. The score, a scaled chi-square statistic, and a decision about model adequacy are different things.
Manages Complexity¶
The scalar objective compresses many covariance residuals into one optimizable number. That makes estimation tractable while risking concealment of the particular residuals, assumptions, or theory constraints responsible for a mismatch.
Abstract Reasoning¶
- State the variables, sample covariance S, and model Sigma(theta).
- Choose and name the fitting convention and its assumptions.
- Evaluate the scalar discrepancy at candidate parameter values.
- Minimize it subject to model restrictions.
- Keep Fmin distinct from a scaled test statistic or fit verdict.
- Inspect residuals, alternatives, and substantive plausibility before interpretation.
Knowledge Transfer¶
The optimization idea transfers to other model-fitting settings, but the term here applies literally when observed and model-implied covariance structures are compared under an SEM estimator. A generic prediction error need not satisfy those typed roles.
Examples¶
Canonical¶
Jorgensen's authored path-model demonstration makes the covariance mismatch inspectable before any fitted-value verdict. In his child-anxiety example, the sample covariance between child anxiety and parent anxiety is 9.21, while the model implies 2.05; the corresponding residual is about 7.2 after rounding. For child anxiety and parent perfectionism, 4.98 observed versus 3.68 implied gives a 1.3 residual. The ML discrepancy function aggregates such matrix mismatches under its log-determinant and trace convention, then parameter search minimizes the scalar. These textbook numbers illustrate the defining calculation, not a second empirical lavaan dataset.
Mapped back: Observed covariance → Jorgensen's sample covariance entries 9.21 and 4.98; Model-implied covariance → path-model entries 2.05 and 3.68; Fitting convention → Jorgensen's stated normal-theory ML function; Scalar mismatch → nonzero covariance residuals contribute to the ML objective; Parameter search → the path parameter is fitted to reduce matrix-wide mismatch; Fit interpretation → residuals expose local misfit even before a test verdict.
Applied / In Practice¶
The official lavaan CFA tutorial fits visual, textual, and speed factors to nine Holzinger–Swineford indicators for 301 observations. Its ML run reports chi-square 85.306 (df 24), and the companion official inspection page reports fmin 0.142. This is a documented fitting calculation, not proof that the model is true or that 0.142 is comparable to a different estimator's value.
Mapped back: Observed covariance → nine-indicator Holzinger–Swineford sample, n=301; Model-implied covariance → three-factor CFA covariance Sigma(theta); Fitting convention → normal-theory ML in official tutorial; Scalar mismatch → reported fmin 0.142; Parameter search → 21 fitted parameters over the model; Fit interpretation → chi-square 85.306 is separately reported, not identical to Fmin.
Structural Tensions¶
T1 — Closer Covariance Fit versus Model Parsimony. Adding free parameters can lower the discrepancy while weakening the constraints that make a model informative.
Diagnostic: What restrictions are substantively justified before optimizing?
T2 — One Scalar Summary versus Localized Misspecification. A single minimum is convenient for estimation but can hide which covariance residual or assumption drives poor reproduction.
Diagnostic: Which residual and model assumption should be inspected?
T3 — Method Comparability versus Method Sensitivity. Different estimators allow data-sensitive fitting but produce differently weighted objectives and uncertainty properties.
Diagnostic: Are compared values from the same fitting convention?
Structural–Framed Character¶
A candidate portable skeleton is model–observation mismatch as an optimization objective. It remains provisional rather than a parent edge: the selected identity is the scalar objective comparing an observed covariance matrix with an SEM model's implied covariance matrix under a specified estimation convention.
Evaluative weight: Technical rather than moral; lower discrepancy expresses better fit under that objective, not proof that the model is true. Human-practice-bound: Moderate: analysts select variables, model class, and estimator, while the objective's input and output types constrain any valid instance. Institutional origin: SEM methodology defines the term; no organization confers fit by naming it. Vocabulary travels: A “discrepancy function” may denote other mismatches, but this node's covariance-pair roles cannot be dropped without changing the concept. Import versus recognize: A new application can be recognized as this SEM construction only if the observed and model-implied covariance structures and scoring rule are present; generic prediction error is merely analogous.
Its character: A formal, method-framed objective with a portable mismatch idea and a domain-bound matrix carrier.
Structural Core vs. Domain Accent¶
Skeletal core. A parameterized model is scored against observations and optimized. Domain-bound accent. SEM's observed and implied covariance matrices plus estimation convention define the precise objective. Transfer boundary. Loss functions in other fields share optimization logic but are not automatically SEM discrepancy functions.
Instantiates / Related Primes¶
This entry is a kind of Function (Mapping).
-
Approved root. The live Measurement prime maps attributes to values, whereas this entry scores a model-implied covariance against an observed matrix; neither is a strict object genus for the other.
-
Neighbor. Discrepancy theory concerns distributional irregularity, not SEM fit.
Relationships to Other Abstractions¶
Current abstraction Discrepancy function Domain-specific
Parents (1) — more general patterns this builds on
-
Discrepancy function is a kind of Function (Mapping) Prime
It is a scalar objective function.It is a scalar objective function.
Hierarchy path (1) — routes to 1 parentless root
- Discrepancy function → Function (Mapping)
Neighborhood in Abstraction Space¶
Discrepancy function sits in a moderately populated region (53rd percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.
Family — Domain-Specific Indicators & Measurement Methods (26 abstractions)
Nearest neighbors
- Estimation of Covariance Matrices — 0.90
- Inferential Error — 0.86
- Self-supervised learning — 0.85
- M-Estimator — 0.85
- Factor Regression Model — 0.85
Computed from structural-signature embeddings · 2026-10-08
Not to Be Confused With¶
- Goodness-of-fit test. Tell: Inferential decision built from fitting outputs, not the objective function itself.
- Chi-square statistic. Tell: Often a scaled transformation of a fitted discrepancy under a reference distribution.
- Discrepancy theory. Tell: Combinatorial distribution theory rather than covariance fitting.
- Residual covariance. Tell: One component of the mismatch, not necessarily the full scalar objective.
References¶
- Yves Rosseel, lavaan: An R Package for Structural Equation Modeling: primary estimator exposition for covariance-model fitting functions.
- Rosseel, lavaan CFA tutorial: actual nine-indicator Holzinger–Swineford fit and chi-square output.
- Rosseel, Extracting information: official output separating
fmin0.142 from chi-square 85.306. - Terrence Jorgensen, Structural Equation Modeling in Educational Research, ch. 10: authored ML formula (10.2) and child-anxiety covariance/residual construction in the Canonical example.
- Wikipedia, Discrepancy function: frozen revision 1202872880 supplied discovery vocabulary only.