Finding the correct combination of lags for forecasting
Posted: Tue Jun 21, 2011 10:52 am
Hello:
I have the following problem:
I have two series of dependent variables and nine series of independent variables. I need to do the following: For each series of dependent variables find the best ten equations of (any)five series of the nine independent variables where each series of independent variables can have a lag of up to 3 years. The major problem i have is that i would like some type of "for loop" that would do the following : "for every possible sub-group of 5 independent series out of the nine possible independent series" run the regressions over all possible combination of lags. I have code that given a sub-group of five independent series runs the regressions over all possible combinations of lags of these 5 series. What i dont have is code that loops through all the sub-groups of five series out of the nine possible series. Could this be done?
Many Thanks for your time.
I have the following problem:
I have two series of dependent variables and nine series of independent variables. I need to do the following: For each series of dependent variables find the best ten equations of (any)five series of the nine independent variables where each series of independent variables can have a lag of up to 3 years. The major problem i have is that i would like some type of "for loop" that would do the following : "for every possible sub-group of 5 independent series out of the nine possible independent series" run the regressions over all possible combination of lags. I have code that given a sub-group of five independent series runs the regressions over all possible combinations of lags of these 5 series. What i dont have is code that loops through all the sub-groups of five series out of the nine possible series. Could this be done?
Many Thanks for your time.