[R] OLS Regression on subset of data

Preetam Pal lordpreetam at gmail.com
Wed Feb 3 19:09:20 CET 2016


Hi,

I am performing OLS regression on a dataset involving variables Y, X1 and
X2, each having 500 observations. I want to perform the regression only on
a subset of the dataset (say, using observations 50 till 350). Is there any
way in which I can pass the entire dataset, but somewhere select these
indices 50-350 and pass this as an argument in the regression function?

Regards,
Preetam

	[[alternative HTML version deleted]]



More information about the R-help mailing list