[RsR] Selecting observations that has smallest absolute residuals
kh@@x131 m@iii@g oii um@@edu
kh@@x131 m@iii@g oii um@@edu
Wed Apr 9 19:03:58 CEST 2008
Hi Everyone,
I want to pick those observation from the regression data that has smallest
absolute residuals . i.e i have run ols on 30 observations of multiple
regression data and got residuals for the whole data. now i want to select
20 observations from the same data that has smallest absolute residuals and
want to run ols again on the selected observations. i used the following
code for selecting 20 observation that has smallest residuals :
> a<- rank(abs(resid))
> which(a %in% c(1:20))
it gives the indices(row numbers) of the regression data that has smallest
absolute residuals (is it correct?). now how to run ols on this i really
need your help?
Thanks in advance,
Dost.
More information about the R-SIG-Robust
mailing list