# Discrepancy function

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Discrepancy_function
> Markdown URL: https://mediated.wiki/source/Discrepancy_function.md
> Source: https://en.wikipedia.org/wiki/Discrepancy_function
> Source revision: 1202872880
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

In [structural equation modeling](/source/Structural_equation_modeling), a **discrepancy function** is a mathematical function which describes how closely a structural model conforms to observed data; it is a measure of [goodness of fit](/source/Goodness_of_fit). Larger values of the discrepancy function indicate a poor fit of the model to data. In general, the parameter estimates for a given model are chosen so as to make the discrepancy function for that model as small as possible. Analogous concepts in statistics are known as [goodness of fit](/source/Goodness_of_fit) or [statistical distance](/source/Statistical_distance), and include [deviance](/source/Deviance_(statistics)) and [divergence](/source/Divergence_(statistics)).

## Examples

There are several basic types of discrepancy functions, including [maximum likelihood](/source/Maximum_likelihood) (ML), [generalized least squares](/source/Generalized_least_squares) (GLS), and [ordinary least squares](/source/Ordinary_least_squares) (OLS), which are considered the "classical" discrepancy functions.[1] Discrepancy functions all meet the following basic criteria:

- They are non-negative, i.e., always greater than or equal to zero.
- They are zero only if the fit is perfect, i.e., if the model and parameter estimates perfectly reproduce the observed data.
- The discrepancy function is a continuous function of the elements of **S**, the sample covariance matrix, and **Σ(θ)**, the "reproduced" estimate of **S** obtained by using the parameter estimates and the structural model.

In order for "maximum likelihood" to meet the first criterion, it is used in a revised form as the [deviance](/source/Deviance_(statistics)).

## See also

- [Constructions of low-discrepancy sequences](/source/Constructions_of_low-discrepancy_sequences)
- [Discrepancy theory](/source/Discrepancy_theory)
- [Low-discrepancy sequence](/source/Low-discrepancy_sequence)

## References

1. ["Discrepancy Functions Used in SEM"](https://web.archive.org/web/20080821171312/http://www.gsu.edu/~mkteer/discrep.html). Archived from [the original](http://www2.gsu.edu/~mkteer/discrep.html) on 2008-08-21. Retrieved 2008-08-18.

---
Adapted from the Wikipedia article [Discrepancy function](https://en.wikipedia.org/wiki/Discrepancy_function) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Discrepancy_function?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
