*! version 1.2.1 07mar2013

Title

regsets -- Generates complete sets of variables for regression analysis

Syntax

regsets : [varlist]

Description

regsets uses combinatory calculus to calculate the number of combinations without repetitions of the set of variables
listed in varlist. For example, a set of 3 variables A, B and C
can generate 3 combinations of 1 variable (A,B,C), 3 combinations of 2 variables
(AB,BC,AC) and 1 combination of 3 variables(ABC) for a total of 7 combinations. The formula
used to calculate the number of possible combinations is 2^(n+1)-1 where n is the number of variables.
This is a shortcut to quickly visualize all possible sets of regressors that can be used from an initial set of variables.

Remarks

regsets is an input to regall.
Use '&' to combine variables and tell the program to treat these variables as one.

Author

Paolo Verme, World Bank, pverme@worldbank.org

Aknowledgments

The author is grateful to Aziz Atamanov, Olivier Dupriez and Philippe Van Kerm for useful suggestions.

Examples

sysuse auto, clear

regsets: headroom price trunk

regsets: headroom weight length&turn