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/
Orthogonal distance, data points to regression
1 message · Rafael Maia