Hi Everyone,
   
  I am an R novice. i want to pick from the 30 regression fitted residuals data those 20 observation that has smallest absolute residuals and run OLS on the selected 20 data and got residuals for all 30 observations from the fitted model based on those 20 observations and want to select again 20 observations that has smallest  residuals..... and so on. i have used these codes
  ...........................
  a<- rank(abs(resid))
  which(a %in% c(1:20))
  sub<- which(a %in% c(1:20))
  lm(formula.original, data = original.data, subset = sub)
  ..................................................
  How  to do it repeatedly?  may be i need a loop for this if i am right, that select 20 out of 30 observation that has smallest absolute residuals and run OLS on it?
   
  Thanking in anticipation
  Dost 

 __________________________________________________



	[[alternative HTML version deleted]]

