subsets of variables from unique combinations of larger set

Use this forum to post questions about syntax problems or general programming issues. Questions on implementing a particular aspect of econometrics should go in "Econometrics Issues" below.
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

subsets of variables from unique combinations of larger set

Unread post by tclark »

With a total of n regressors, I would like to consider models (quantile regressions, actually) estimated separately for each unique combination of 1 to k variables, where k < n. For the k=2, it is trivial to use a pair of do loops for this. But in the more general case with k > 2, something more elegant is needed. Any suggestions for an efficient way to do this in RATS? (By way of explanation, this basically comes out of the forecasting-focused subset regression approach in Graham Elliott, Antonio Gargano, Allan Timmermann, Complete subset regressions, Journal of Econometrics, Volume 177, Issue 2, 2013, Pages 357-373, https://doi.org/10.1016/j.jeconom.2013.04.017.) Thanks much
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
TomDoan
Posts: 7776
Joined: Wed Nov 01, 2006 4:36 pm

Re: subsets of variables from unique combinations of larger

Unread post by TomDoan »

@gencombos will do that.
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

Re: subsets of variables from unique combinations of larger

Unread post by tclark »

Perfect -- thanks very much. I searched various places for "combination" and related terms but didn't hit on that solution.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Post Reply