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 <[email protected]>
To   [email protected]
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.


*   For searches and help try:

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