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.

Scope of Application

The fitting convention and sample matter; a minimized objective is not by itself an adequacy verdict.

  • 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 structural-equation-model discrepancy function scores the gap between observed covariance S and model-implied covariance Sigma(theta). Model parameters are fitted to reduce the score. It differs from a scaled chi-square test statistic and from a judgment that the model is true.

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

Specify S, Sigma(theta), and the estimator; evaluate mismatch, fit model parameters, then interpret the minimum alongside residuals and theory. Compare objective values only when their fitting conventions support comparison.

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.

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