[R] How to do linear regression with errors in x and y?

Prof Brian D Ripley ripley at stats.ox.ac.uk
Sun Jun 4 07:38:01 CEST 2000


On Sat, 3 Jun 2000, Dan E. Kelley wrote:

> QUESTION: how should I do a linear regression in which there are
> errors in x as well as y?

By definition, that is not a linear *regression*.  More precisely,
what you should do depends critically on the assumptions and purpose
of the analysis.  For example, for a calibration problem regression
of x on y (that is least-squares fitting) is still a good idea. And it
depends on whether the observed x values were controlled or the
true values or if this is a random sample of (x,y)'s.

In what I think you want there is a true linear relationship and
both x and y are measured with error, and you are interested in the
relationship.  That's called a linear functional relationship model.
(Econometricians use structural models, the radnom-sample version.)

[...]

> Thus, I'd be happy to state that the errors in the dependent and
> independent variables are comparable.  And so my question becomes, on
> this assumption, how to fit a line through data in which both "x" and
> "y" have (equal) uncertainty.  I'm thinking the eigenvector approach
> is fine.  Comments?

As Jan de Leeuw has already commented, this is an extremely well
re-discovered result, going back to Adcock ca 1872.  But minor
variations still seem unknown (and I once wrote a paper on the
variation in which the uncertainty in x and y depend on the true
value, as occurs in analytical chemistry).

There is a whole book on this and related ideas:

@Book{Fuller.87,
  author       = "Fuller, W.",
  title        = "Measurement Error Models",
  publisher    = "Wiley",
  year         = "1987",
}

and you will find treatments in a few linear models books, AFAIR
those by G.A.F. Seber and P. Sprent especially.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list