Does anyone know if there is a simple (or not so simple) way to create a
varlist of all the variables in the dataset. I'd like to loop across my
variables regressing on another variable so I can predict values for each
variable under an assumption about my independent variable.
For example if I have three variables a, b, and c, and another independent
variable i, I'd like to regress a i , regress b i, and regress c i and after
each regression take the coef and multiply it by a value of i to predict an
outcome. The problem is that I have an unknown number of variables and I'd
like to be able take the full list and loop across it.
Thanks!
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/