Hello Statalists,

I have data points (units in mm) and have performed regression on it. Now I need to find the data points whose distance above the regression line is less than a certain criteria i.e. max[1SE, 1mm]. max[..]is the maximum of parameters in bracket, SE is standard error of regression, defined as square root of residual mean square. As I am novice to stata, I am not very familiar with its commands. So, if anyone can help me in writing the code for the following, it shall be a big help.

Thanks in advance!