Algorithm Search⌘K

Modeladvanced

Errors-in-variables model

Also called measurement error model, Deming regression.

A regression model in which the predictors are observed with noise. Least squares is then biased toward zero, and Deming or orthogonal regression corrects it.

The errors-in-variables model is a regression in which the predictor is not observed exactly: the data contain xi=ξi+uix_i = \xi_i + u_i, where ξi\xi_i is the true value and uiu_i is measurement error. Ordinary least squares of yy on xx is then not consistent. Its slope converges to the true slope times the reliability ratio λ=σξ2/(σξ2+σu2)<1\lambda = \sigma_\xi^2/(\sigma_\xi^2 + \sigma_u^2) < 1, so the effect looks weaker than it is; this is called attenuation. Without extra information the slope is not identified when all variables are normal. With extra information it can be estimated consistently. If the ratio of the two error variances is known, the maximum likelihood fit has a closed form, which Deming (1943) used. If the ratio is 1, the fit is orthogonal regression, which minimizes perpendicular distances and is computed by the singular value decomposition. A known reliability ratio, replicate measurements or an instrument are other ways to restore identification.

The machine

Data. Pairs (xi,yi)(x_i, y_i), i=1,…,ni = 1, \dots, n, generated as

xi=ξi+ui,yi=α+βξi+εi,x_i = \xi_i + u_i, \qquad y_i = \alpha + \beta\xi_i + \varepsilon_i,

where ξi\xi_i is the true predictor, uiu_i the measurement error with mean 0 and variance σu2\sigma_u^2, and εi\varepsilon_i the equation error with mean 0 and variance σε2\sigma_\varepsilon^2. The errors uiu_i and εi\varepsilon_i are independent of each other, of the ξj\xi_j and across ii. This is the classical error model: the error is added to the true value and does not depend on it.

Two versions. In the structural model the ξi\xi_i are independent draws from a law with mean μξ\mu_\xi and variance σξ2>0\sigma_\xi^2 > 0. In the functional model the ξi\xi_i are fixed unknown numbers, one parameter for each observation.

Parameter space. (α,β,μξ,σξ2,σu2,σε2)(\alpha, \beta, \mu_\xi, \sigma_\xi^2, \sigma_u^2, \sigma_\varepsilon^2) in the structural model, with σξ2>0\sigma_\xi^2 > 0 and nonnegative error variances. Extra information that restores identification is one of the following: the ratio δ=σε2/σu2\delta = \sigma_\varepsilon^2/\sigma_u^2 is known; σu2\sigma_u^2 or the reliability ratio λ\lambda is known, for example from replicate measurements; or an instrument ziz_i is observed that is correlated with ξi\xi_i but not with uiu_i or εi\varepsilon_i.

Several predictors. With pp predictors, xi=ξi+uix_i = \xi_i + u_i in Rp\mathbb R^p, Σξξ\Sigma_{\xi\xi} the covariance of ξi\xi_i and Σuu\Sigma_{uu} that of uiu_i; some rows and columns of Σuu\Sigma_{uu} are 0 for predictors measured without error.

What it counts

  • The slope β\beta of the true predictor. This is the target. The slope of yy on the observed xx is a different quantity, λβ\lambda\beta, and it is the right target only for prediction of yy from future values of xx measured with the same error.
  • The reliability ratio λ=σξ2/(σξ2+σu2)\lambda = \sigma_\xi^2/(\sigma_\xi^2 + \sigma_u^2), the part of the variance of xx that is true signal.
  • The error variance ratio δ=σε2/σu2\delta = \sigma_\varepsilon^2/\sigma_u^2, which fixes the direction in which the residuals are measured.
  • The true values ξi\xi_i in the functional model; the fit gives estimates ξ^i\hat\xi_i, the points on the fitted line that are nearest to the data in the metric that δ\delta defines.

Relation to other models

  • Ordinary regression is the case σu2=0\sigma_u^2 = 0, or δ=∞\delta = \infty: then xi=ξix_i = \xi_i, and least squares is unbiased and is BLUE by the Gauss-Markov theorem.
  • Reverse regression is the case σε2=0\sigma_\varepsilon^2 = 0, or δ=0\delta = 0: yy is exact, and the slope of xx on yy, inverted, is consistent.
  • Orthogonal regression and total least squares. The case δ=1\delta = 1 minimizes the sum of squared perpendicular distances to the line. In matrix form this is total least squares, solved by the singular value decomposition of the centred data matrix; the normal of the line is the right singular vector of the smallest singular value, and the line direction is the first principal component. There is no separate page for total least squares.
  • Factor analysis. The structural model is a one-factor model: xx and yy are two noisy indicators of the factor ξ\xi. With only two indicators the factor analysis model is not identified, which is the same fact as Result 2 below.
  • Instrumental variables. A variable correlated with ξ\xi and not with the errors identifies β\beta as a ratio of covariances; see instrumental variables estimation.
  • Berkson error. If instead ξi=xi+ui\xi_i = x_i + u_i with uiu_i independent of xix_i, as when a dose is set to xix_i and the true dose varies around it, least squares of yy on xx stays unbiased for β\beta in a linear model. The direction of the error decides which model applies.
  • Weighted least squares fits a model where only yy has errors of unequal size; see weighted least squares.

Known results in the model

1. Attenuation (proved here). In the structural model with σξ2>0\sigma_\xi^2 > 0, the least squares slope β^OLS=sxy/sxx\hat\beta_{\mathrm{OLS}} = s_{xy}/s_{xx} satisfies

β^OLS→λβ=σξ2σξ2+σu2βalmost surely as n→∞.\hat\beta_{\mathrm{OLS}} \to \lambda\beta = \frac{\sigma_\xi^2}{\sigma_\xi^2 + \sigma_u^2}\beta \quad \text{almost surely as } n \to \infty.

Proof. Here sxx=1n∑(xi−xˉ)2s_{xx} = \frac1n\sum(x_i - \bar x)^2 and sxy=1n∑(xi−xˉ)(yi−yˉ)s_{xy} = \frac1n\sum(x_i - \bar x)(y_i - \bar y). By the strong law of large numbers applied to the independent rows, sxx→Var⁡(x)=σξ2+σu2s_{xx} \to \operatorname{Var}(x) = \sigma_\xi^2 + \sigma_u^2 and sxy→Cov⁡(x,y)s_{xy} \to \operatorname{Cov}(x, y). By independence of ξ\xi, uu and ε\varepsilon, Cov⁡(ξ+u,α+βξ+ε)=βσξ2\operatorname{Cov}(\xi + u, \alpha + \beta\xi + \varepsilon) = \beta\sigma_\xi^2. The ratio of the limits is λβ\lambda\beta, since the limit of sxxs_{xx} is positive. □\square

So the bias does not shrink with nn. With β=2\beta = 2, σξ2=1\sigma_\xi^2 = 1 and σu2=0.25\sigma_u^2 = 0.25, λ=0.8\lambda = 0.8 and the slope converges to 1.6. If λ\lambda is known, β^OLS/λ\hat\beta_{\mathrm{OLS}}/\lambda is consistent; this is a method of moments correction.

With pp predictors and an intercept, the same argument gives b^→(Σξξ+Σuu)−1Σξξβ\hat b \to (\Sigma_{\xi\xi} + \Sigma_{uu})^{-1}\Sigma_{\xi\xi}\beta. Error in one predictor then biases the coefficients of the other predictors as well, when they are correlated with it; the direction of that bias depends on the correlations.

2. Not identified for normal data, and the bounds (proved here). Let (ξ,u,ε)(\xi, u, \varepsilon) be jointly normal. Then (x,y)(x, y) is bivariate normal, and its law fixes only the means and a=Var⁡(x)a = \operatorname{Var}(x), b=Cov⁡(x,y)b = \operatorname{Cov}(x, y), c=Var⁡(y)c = \operatorname{Var}(y). Suppose b>0b > 0. Every β′∈[b/a,c/b]\beta' \in [b/a, c/b] gives the same law with

σξ′2=b/β′,σu′2=a−b/β′≥0,σε′2=c−β′b≥0,\sigma_\xi'^2 = b/\beta', \qquad \sigma_u'^2 = a - b/\beta' \ge 0, \qquad \sigma_\varepsilon'^2 = c - \beta'b \ge 0,

and suitable means, and no β′\beta' outside the interval does.

Proof. The model gives Var⁡(x)=σξ2+σu2\operatorname{Var}(x) = \sigma_\xi^2 + \sigma_u^2, Cov⁡(x,y)=βσξ2\operatorname{Cov}(x, y) = \beta\sigma_\xi^2 and Var⁡(y)=β2σξ2+σε2\operatorname{Var}(y) = \beta^2\sigma_\xi^2 + \sigma_\varepsilon^2. The three choices above satisfy these equations with (a,b,c)(a, b, c), and they are valid variances exactly when β′≥b/a\beta' \ge b/a and β′≤c/b\beta' \le c/b; the interval is not empty, since b2≤acb^2 \le ac by the Cauchy-Schwarz inequality. Conversely, any parameter set with Cov⁡=b>0\operatorname{Cov} = b > 0 has β′>0\beta' > 0 and σξ′2=b/β′\sigma_\xi'^2 = b/\beta', and then σu′2≥0\sigma_u'^2 \ge 0 and σε′2≥0\sigma_\varepsilon'^2 \ge 0 force the interval. □\square

So the data can bound the slope between the least squares slope of yy on xx and the inverse of the slope of xx on yy, but no estimator can do better without extra information. Reiersøl (1950) proved the converse direction, which is cited and not proved here: if the errors are normal and ξ\xi is not normal, β\beta is identified, because higher moments of (x,y)(x, y) then carry information.

3. The closed form for a known variance ratio (proved here). Let δ=σε2/σu2>0\delta = \sigma_\varepsilon^2/\sigma_u^2 > 0 be known, and let sxxs_{xx}, syys_{yy}, sxy≠0s_{xy} \ne 0 be the sample moments. In the functional model with normal errors, the maximum likelihood estimate minimizes

∑i[δ(xi−ξi)2+(yi−α−βξi)2]\sum_i\big[\delta(x_i - \xi_i)^2 + (y_i - \alpha - \beta\xi_i)^2\big]

over α\alpha, β\beta and ξ1,…,ξn\xi_1, \dots, \xi_n, and the minimizing slope is

β^δ=syy−δsxx+(syy−δsxx)2+4δsxy22sxy,α^=yˉ−β^δxˉ.\hat\beta_\delta = \frac{s_{yy} - \delta s_{xx} + \sqrt{(s_{yy} - \delta s_{xx})^2 + 4\delta s_{xy}^2}}{2s_{xy}}, \qquad \hat\alpha = \bar y - \hat\beta_\delta\bar x.

Proof. For fixed α\alpha and β\beta, put ri=yi−α−βxir_i = y_i - \alpha - \beta x_i and s=ξi−xis = \xi_i - x_i. The term for ii is δs2+(ri−βs)2\delta s^2 + (r_i - \beta s)^2, a quadratic in ss with minimum at s=βri/(δ+β2)s = \beta r_i/(\delta + \beta^2) and minimum value δri2/(δ+β2)\delta r_i^2/(\delta + \beta^2). So the problem is to minimize δ∑iri2/(δ+β2)\delta\sum_ir_i^2/(\delta + \beta^2). For fixed β\beta the best α\alpha is yˉ−βxˉ\bar y - \beta\bar x, and the objective becomes nδf(β)n\delta f(\beta) with

f(β)=syy−2βsxy+β2sxxδ+β2.f(\beta) = \frac{s_{yy} - 2\beta s_{xy} + \beta^2s_{xx}}{\delta + \beta^2}.

Setting f′(β)=0f'(\beta) = 0 and simplifying gives sxyβ2+(δsxx−syy)β−δsxy=0s_{xy}\beta^2 + (\delta s_{xx} - s_{yy})\beta - \delta s_{xy} = 0. The product of its two roots is −δ<0-\delta < 0, so one root is positive and one is negative. At a root, the equation gives f(β)=sxx−sxy/βf(\beta) = s_{xx} - s_{xy}/\beta, which is smaller at the root with the same sign as sxys_{xy}; that is the root with the plus sign. Since f(β)→sxxf(\beta) \to s_{xx} as β→±∞\beta \to \pm\infty and ff at that root is below sxxs_{xx}, the root is the global minimum. □\square

As δ→∞\delta \to \infty, β^δ→sxy/sxx\hat\beta_\delta \to s_{xy}/s_{xx}, the least squares slope; as δ→0\delta \to 0, β^δ→syy/sxy\hat\beta_\delta \to s_{yy}/s_{xy}, the inverted reverse slope. In between, for sxy>0s_{xy} > 0, β^δ\hat\beta_\delta lies in the sample version of the interval of Result 2: the quadratic g(β)=sxyβ2+(δsxx−syy)β−δsxyg(\beta) = s_{xy}\beta^2 + (\delta s_{xx} - s_{yy})\beta - \delta s_{xy} equals sxy(sxy2−sxxsyy)/sxx2≤0s_{xy}(s_{xy}^2 - s_{xx}s_{yy})/s_{xx}^2 \le 0 at sxy/sxxs_{xy}/s_{xx} and δ(sxxsyy−sxy2)/sxy≥0\delta(s_{xx}s_{yy} - s_{xy}^2)/s_{xy} \ge 0 at syy/sxys_{yy}/s_{xy}. Since ∂g/∂δ=sxxβ−sxy≥0\partial g/\partial\delta = s_{xx}\beta - s_{xy} \ge 0 there and ∂g/∂β>0\partial g/\partial\beta > 0 at the positive root, β^δ\hat\beta_\delta decreases as δ\delta grows. With δ=1\delta = 1, f(β)f(\beta) is the mean squared perpendicular distance from the points to the line, and its minimum is the smallest eigenvalue of the 2×22 \times 2 matrix of sample moments, which is the squared smallest singular value of the centred data divided by nn. The estimator is consistent in the functional and in the structural model when δ\delta is right (Fuller 1987, Chapter 1); this is cited. With a wrong δ\delta it converges to a wrong slope inside the interval of Result 2.

4. Unknown variance ratio in the functional model (shown here). If δ\delta is not known, the normal functional likelihood has no maximum: put every ξi\xi_i at xix_i, fix σε>0\sigma_\varepsilon > 0 and let σu→0\sigma_u \to 0; the factor ∏iσu−1exp⁡(−(xi−ξi)2/2σu2)=σu−n\prod_i\sigma_u^{-1}\exp(-(x_i - \xi_i)^2/2\sigma_u^2) = \sigma_u^{-n} grows without bound. So the functional model needs extra information, such as a known δ\delta, before maximum likelihood makes sense.

5. Other corrections (cited). Carroll, Ruppert, Stefanski and Crainiceanu (2006) treat regression calibration, which replaces xix_i by an estimate of E[ξi∣xi]E[\xi_i \mid x_i] and is exact for linear models with normal ξ\xi; simulation extrapolation, which adds more error in steps, watches how the estimate changes and extrapolates back to zero error; and instrumental variables. These also apply to nonlinear models such as logistic regression, where no closed form exists.

6. A worked example. Take x=(1,2,3,4,5)x = (1, 2, 3, 4, 5) and y=(2,3,5,4,6)y = (2, 3, 5, 4, 6). The centred sums are ∑(x−xˉ)2=10\sum(x - \bar x)^2 = 10, ∑(y−yˉ)2=10\sum(y - \bar y)^2 = 10 and ∑(x−xˉ)(y−yˉ)=9\sum(x - \bar x)(y - \bar y) = 9, with xˉ=3\bar x = 3 and yˉ=4\bar y = 4.

method δ\delta slope intercept
least squares of yy on xx ∞\infty 0.9 1.3
known ratio 2 0.9639 1.1084
orthogonal regression 1 1 1
known ratio 0.5 1.0375 0.8875
inverted reverse regression 0 1.1111 0.6667

For δ=1\delta = 1 the formula gives (10−10+0+4⋅81)/18=1(10 - 10 + \sqrt{0 + 4 \cdot 81})/18 = 1 exactly. The residuals from the line y=1+xy = 1 + x are (0,0,1,−1,0)(0, 0, 1, -1, 0), so the sum of squared perpendicular distances is 2/(1+12)=12/(1 + 1^2) = 1. This equals the smallest eigenvalue of (109910)\begin{pmatrix}10 & 9\\ 9 & 10\end{pmatrix}, whose eigenvalues are 1 and 19; the eigenvector (1,−1)/2(1, -1)/\sqrt2 is the normal of the line. The fitted true values are ξ^=x+r/2=(1,2,3.5,3.5,5)\hat\xi = x + r/2 = (1, 2, 3.5, 3.5, 5). A grid search over the slope with step 10−510^{-5} gives the same minimizers for each δ\delta in the table.

References

  1. Wayne A. Fuller, Measurement Error Models, Wiley, 1987, Chapter 1 (one explanatory variable; the attenuation of least squares, identification, and estimation when the ratio of the error variances or the reliability ratio is known)
  2. Olav Reiersøl, Identifiability of a linear relation between variables which are subject to error, Econometrica 18(4), 1950, pp. 375 to 389, The whole paper (the slope of a straight line with errors in both variables is identified unless the true predictor is normal)
  3. W. Edwards Deming, Statistical Adjustment of Data, Wiley, 1943; Dover reprint, 1964, Parts A and B (curve fitting and the general least squares adjustment when all observed coordinates have errors with known relative weights)
  4. Raymond J. Carroll, David Ruppert, Leonard A. Stefanski and Ciprian M. Crainiceanu, Measurement Error in Nonlinear Models, A Modern Perspective, second edition, Chapman and Hall/CRC, 2006, Chapter 3 (linear regression and attenuation), Chapter 4 (regression calibration), Chapter 5 (simulation extrapolation) and Chapter 6 (instrumental variables)
  5. Gene H. Golub and Charles F. Van Loan, An analysis of the total least squares problem, SIAM Journal on Numerical Analysis 17(6), 1980, pp. 883 to 893, The whole paper (total least squares by the singular value decomposition)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/TCKK8T/text.yaml