From: Green T on
I am using robustfit(x, y) to do linear regression. I wonder whether, how can I get the information, which datapoints where considered during the fit as outliers, i.e. if I plot the data and the regression line, I see that x5,y5 are way out. But how can I get this automatically?

Thanks
From: Tom Lane on
>I am using robustfit(x, y) to do linear regression. I wonder whether, how
>can I get the information, which datapoints where considered during the fit
>as outliers, i.e. if I plot the data and the regression line, I see that
>x5,y5 are way out. But how can I get this automatically?

The robustfit function doesn't explicitly label certain points as outliers
and other points as not outliers. Instead, it computes a set of weights to
down-weight points depending on how poorly the function seems to fit them.
You can look at the "w" field in the output structure to see these weights.
Then you could, say, find the points with weights below 0.1 or any other
cutoff.

-- Tom