# [R] orthogonal distance regression package?

Wed Feb 29 19:58:55 CET 2012

```My understanding is that TLS, EIV, and orthogonal regression are closely related but separate concepts.
If you read the  'Talk' at the Wikipedia page referenced below, you will see that many people have
terminology problems as well.
My take is that TLS is a special case of EIV and orthogonal linear regression is a special case of TLS.
** If your data is centered, then the orthogonal regression slope is just the ratio of the standard deviations of the two variables. **
You can get the same thing from PCA if you first scale by the SD's and then restore them after finding the first eigenvector.
The TLS and EIV approaches are more general, but assuming that the relative errors in the variables are equal, and things are 'nice' gives the simple result above.

The page Mark refers to from Sabine van Huffel's book on TLS is visible in Google books.

HTH,
-- David

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Mark Leeds
Sent: Wednesday, February 29, 2012 12:37 PM
Cc: <r-help at r-project.org>; Bert Gunter
Subject: Re: [R] orthogonal distance regression package?

Hi: I can't find it anywhere on the internet but I have a book that shows that, as long as the SVD of the X matrix can be obtained, then the coefficient solution to TLS ( least angle regression )  is only a function of the eigenvectors.
Therefore, principal components can be used to obtain the coefficients in TLS which could be why there may not be an R package out there.

The book is titled "The Total Least Squares Problem" Huffel and Vandewalle.

Paul Teetor's paper ( see link below ) has an example of using principal components to calculate the coefficients in a univariate TLS.

Disclaimer: I've never used TLS regression and never studied it so there could be subtlleties where the result doesn't hold. The result is on page
37 of the book and the book is almost 300 pages so the SVD approach must not work all the time.

''

On Wed, Feb 29, 2012 at 1:19 PM, Adam Waytz < a-waytz at kellogg.northwestern.edu> wrote:

>
> In the age of google, I have found that concepts such as these are
> more complex than what Wikipedia provides. Going far beyond a cursory
> search, it appeared to me there are subtle differences between these
> terms. I was hoping this knowledgeable community could provide insight
> on an R package to perform ODR. Thank you.
>
> On Feb 29, 2012, at 12:07 PM, "Bert Gunter" <gunter.berton at gene.com>
> wrote:
>
> > On Wed, Feb 29, 2012 at 7:53 AM, Adam Waytz
> > <a-waytz at kellogg.northwestern.edu> wrote:
> >>
> >> Hello,
> >>
> >> I am extremely new to R and have found some leads to this question
> >> in
> the archives, but I am still a bit uncertain.
> >> I am looking for an R package to carry out orthogonal distance
> regression.  I found some answers regarding Deming
> >> regression and Total Least Squares regression, but I was unclear if
> these are identical terms.
> >
> > In the age of Google?!
> >
> > Searching on "orthogonal regression" brought up:
> >
> > http://en.wikipedia.org/wiki/Total_least_squares
> >
> > which provides info. Sheesh!
> >
> > I suggest you also check the ChemPhys and Econometrics task views on
> > CRAN to see what they have to offer.
> >
> > Incidentally, my very limited understanding is that orthogonal
> > regression (for errors in variables) can be problematic. The
> > wikipedia article provides more details.
> >
> > -- Bert
> >
> >  Please let me know if
> >> a package is available.
> >>
> >> Thank you,
> >>
> >> ______________________________________________
> >> R-help at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-help
> http://www.R-project.org/posting-guide.html
> >> and provide commented, minimal, self-contained, reproducible code.
> >
> >
> >
> > --
> >
> > Bert Gunter
> > Genentech Nonclinical Biostatistics
> >
> > Internal Contact Info:
> > Phone: 467-7374
> > Website:
> >
> -biostatistics/pdb-ncb-home.htm
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help