[R] orthogonal/perpendicular distance from regression line
mark_difford at yahoo.co.uk
Sat Feb 21 10:06:40 CET 2009
>> You could do this with , but if you are hoping to learn something
>> statistical by doing this you should probably reconsider, because the
>> regression line residuals are minimized along the dependent variable
It should be said that there are valid forms of linear regression where this
is not true and it is the orthogonal residuals that are wanted. Perhaps the
main case is where there are errors in x and y: indeed, this is how the
"lines" (i.e. principal components) are fitted in principal component
Jeff Newmiller wrote:
> On Fri, 20 Feb 2009, GAF wrote:
>> Hi there,
>> I am trying to measure orthogonal/perpendicular distances from regression
>> lines (i.e. the shortest distance from a given point to my regression
>> As it sounds rather easy (basically just an orthogonal/perpendicular
>> residual) I hoped that there was some function in R that can do that. All
>> efforts so far remained unsuccessful, however.
>> Does anybody know?
> You could do this with , but if you are hoping to learn something
> statistical by doing this you should probably reconsider, because the
> regression line residuals are minimized along the dependent variable axis,
> and if the coordinate system is rotated (that is, you look at
> deviation from the regression line to the points along a different
> direction) then the residuals on that regression line will no longer be
>  http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html
> Jeff Newmiller The ..... ..... Go
> DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://www.nabble.com/orthogonal-perpendicular-distance-from-regression-line-tp22123179p22134025.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help