Re: [R] orthogonal/perpendicular distance from regression line

2009-02-21 Thread Mark Difford
Hi Jeff, >> You could do this with [1], 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, It should be said that there are valid forms of linear regres

Re: [R] orthogonal/perpendicular distance from regression line

2009-02-20 Thread Jeff Newmiller
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 line). > As it sounds rather easy (basically just an orthogonal/perpendicular > residual) I hoped that t

Re: [R] orthogonal/perpendicular distance from regression line

2009-02-20 Thread roger koenker
For the bivariate case: g <- function(b,x,y) (abs(y - b[1] - b[2] * x))/sqrt(1 + crossprod(b)) url:www.econ.uiuc.edu/~rogerRoger Koenker emailrkoen...@uiuc.eduDepartment of Economics vox: 217-333-4558University of Illinois fax: 2

[R] orthogonal/perpendicular distance from regression line

2009-02-20 Thread GAF
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 line). As it sounds rather easy (basically just an orthogonal/perpendicular residual) I hoped that there was some function in R that can do that