5

Deming Regression is a regression technique taking into account uncertainty in both the explanatory and dependent variable.

Although I have found some interesting references on the calculation of this property in matlab and in R I'm stuck when I try to calculate the standard prediction error. The error on the model estimate is given in both methods, but I wonder if I can use that for prediction by using the variances of their prediction. Eg: var(y_pred) = var(a*x+b) = E[a]^2*var(x) + E[x]^2*a+var(b)

Stéphane Laurent
  • 17,425
  • 5
  • 59
  • 101
johanvdw
  • 183
  • 7
  • Are you trying to calculate the variance of y_pred in Deming Regression. I am sorry, its not clear to me. – suncoolsu Jan 11 '11 at 14:34
  • Sorry for being unclear. I would like to know the prediction error when I use a new x (not one used to fit the model) trying to predict y (y_pred). The standard error of x is known. – johanvdw Jan 11 '11 at 14:44

1 Answers1

7

Update I've updated the answer to reflect the discussions in the comments.

The model is given as \begin{align*} y&=y^{*}+\varepsilon\\\\ x&=x^{*}+\eta\\\\ y^{*}&=\alpha+x^{*}\beta \end{align*}

So when forecasting with a new value $x$ we can forecast either $y$ or $y^{*}$. Their forecasts coincide $\hat{y}=\hat{y}^{*}=\hat{\alpha}+\hat{\beta}x$ but their error variances will be different:

$$Var(\hat{y})=Var(\hat{y}^{*})+Var(\varepsilon)$$

To get $Var(\hat{y}^{*})$ write

\begin{align*} \hat{y}^{*}-y^{*}&=\hat{\alpha}-\alpha+\hat{\beta} (x^{*}+\eta)-\beta x^{\*}\\\ &=(\hat{\alpha}-\alpha)+(\hat{\beta}-\beta) x^{*}+ \hat{\beta}\eta \end{align*}

So

\begin{align*} Var(\hat{y}^{*})=E(\hat{y}^{*}-y^{*})^2&=D(\hat{\alpha}-\alpha)+D(\hat{\beta}-\beta) (x^{*})^2+ E\hat{\beta}^2D\eta\\\\ & + 2\textrm{cov}(\hat{\alpha}-\alpha,\hat{\beta}-\beta)x^{*} \end{align*}

Stéphane Laurent
  • 17,425
  • 5
  • 59
  • 101
mpiktas
  • 33,140
  • 5
  • 82
  • 138
  • 1
    Good answer. However, I think, if @johanvdw wants to predict for new x, the prediction error will be larger than you estimate. If I understood him correctly, var(pred_y) = var(\hat y) + var(error). – suncoolsu Jan 11 '11 at 15:30
  • thanks, that was fast! @suncoolsu I think the error in y should not be added. The regression coefficients already include that uncertainty. You wouldn't add it in a normal linear regression either. – johanvdw Jan 11 '11 at 15:45
  • 1
    @johanvdw. I think we do need to add the error in normal linear regression for prediction of a new Y (for a new X). Please see : equation 2.38 in section 2.5 of Applied Linear Statistical Models - Kutner, Nachtsheim, Neter, and Li (2005). McGrawHill – suncoolsu Jan 11 '11 at 18:12
  • @suncoolsu and @johanvdw, I've updated the answer to reflect your discussion. @suncoolsu is right, we need to add the error, but only if we want to forecast true $y$, if we want the forecast of $y^*$ the addition is not necessary. @johanvdw in normal linear regression error addition is necessary, since normal linear regression does not postulate the latent variable $y^{*}$ – mpiktas Jan 11 '11 at 20:14
  • @suncoolsu, jogandw and mpiktas, please do you know a reference for the "total least squares" approach to Deming's regression ? – Stéphane Laurent Nov 15 '12 at 19:59