Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: list of all variables in dataset


From   Jason Rachlin <Jason.Rachlin@morganstanley.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: list of all variables in dataset
Date   Fri, 05 Nov 2004 17:09:49 +0000

 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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index