[R-sig-eco] Orthogonal distance, data points to regression

Rafael Maia queirozrafaelmv at yahoo.com.br
Mon Jan 26 05:42:25 CET 2009


Dear list members,

I am analyzing a data frame consisting of two variables. There is a  
trade-off between these two variables, and I have estimated a  
regression line which represents the "upper bound" of the resolution  
of this trade-off. You can basically imagine a scatterplot with data  
points roughly distributed as a triangle, and the hypothenuse of this  
triangle being this upper bound limit.

I would like, thus, to calculate the orthogonal distance from each  
data point to this regression line. I have two problems; first, the  
upper bound regression line does not use all the data. I assumed I  
could get the distances by using an offset and extracting the  
residuals. When I plot the lm() with the offset, the predicted line is  
roughly equivalent to the upper bound, but the residuals are evenly  
distributed around zero (I'd expect them to be mostly negative). The  
second problem is that these residuals, from what I understand,  
wouldn't be orthogonal distances, but the difference between fitted Y  
and Y.

Any ideas on how to extract this information?

Many thanks in advance!

Abraços,
Rafael Maia
---
"A little learning is a dangerous thing; drink deep, or taste not the  
Pierian spring." (A. Pope)
Laboratório de Comportamento Animal
Departamento de Zoologia, Universidade de Brasilia
http://www.unb.br/ib/zoo/rhmacedo/



More information about the R-sig-ecology mailing list