Skip to content

Discrepancy function

A scalar covariance-mismatch objective minimized when fitting a structural equation model.

Version
v1 · 2026-09-28 · History
Domain-specific #
9006
Domain group
Formal Sciences
Origin domain
Experimental Design & Statistics
Subdomain
Structural Equation Modeling → Experimental Design & Statistics

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

Scientists make a guess about how different things go up and down together. Then they check real data. A discrepancy function is a number that says how far the guess is from the real data, and they tweak the guess to make that number as small as they can. A small number still does not prove the guess is right.

The Model Mismatch Score

Scientists sometimes build a model that predicts how different measurements, like test scores, should go up and down together. A discrepancy function is a formula that squashes the difference between the real patterns in the data and the model's predicted patterns into one number. The computer then tries different settings for the model to make that number as small as possible. There are different formulas, and they count mismatches in different ways, so you have to say which one you used. A small number is good, but it does not prove the model's explanation is true.

Covariance Fitting Objective

In structural equation modeling, researchers compare how variables actually vary together in data (the observed covariance matrix, S) with how a model says they should vary together (the model-implied covariance matrix, Sigma(theta)). A discrepancy function turns that comparison into a single number to minimize: estimation searches over the model's free parameters theta to make it small. You must state which fitting method you use, because maximum likelihood and least-squares versions weight mismatches differently. For example, in a standard lavaan confirmatory factor analysis with three factors and nine test scores, the minimum value reported is 0.142, while a chi-square statistic of 85.306 is reported separately; they are different outputs of the same fit. A small minimum does not by itself confirm the psychological theory, and a p-value is a later step, not the discrepancy function itself.

 

In structural equation modeling, a discrepancy function F(S, Sigma(theta)) converts the problem of reproducing observed covariances into a scalar optimization objective. S is the sample covariance matrix and Sigma(theta) is the covariance matrix implied by the model at parameter values theta; estimation seeks the theta that minimizes F. The fitting convention must be stated because different estimators, such as maximum likelihood and various least-squares methods, weight mismatches between S and Sigma(theta) differently and so define different functions. The minimized value is distinct from the test statistics and fit judgments derived from it. In an official lavaan example, a three-factor CFA on nine indicators yields fmin = 0.142 and a separately reported chi-square of 85.306, two different outputs of one fitted analysis. A small minimum does not validate the substantive model, and a p-value is a subsequent inferential judgment rather than part of the fitting function.

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

  1. State the variables, sample covariance S, and model Sigma(theta).
  2. Choose and name the fitting convention and its assumptions.
  3. Evaluate the scalar discrepancy at candidate parameter values.
  4. Minimize it subject to model restrictions.
  5. Keep Fmin distinct from a scaled test statistic or fit verdict.
  6. 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.

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

Local relationship map for Discrepancy functionParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Discrepancy functionDOMAINPrime abstraction: Function (Mapping) — is a kind ofFunction(Mapping)PRIME

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.

Hierarchy path (1) — routes to 1 parentless root

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

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