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

st: RE: RE: RE: Variable list

From   "Nick Cox" <>
To   <>
Subject   st: RE: RE: RE: Variable list
Date   Mon, 7 Nov 2005 10:32:07 -0000

That's not forced upon you by anything. If x1 ... x10
are of the same status and belong together then much 
will be made easier by using -order- to make them 
adjacent in the data set. 


Wanli Zhao
> Thanks, Nick. Usually, I'd say we may have to use macro most 
> of the time.

Nick Cox
> What you ask for is called a local macro in Stata and is 
> documented under 
> . help macro
> and in [U] 18.3.1. For example, 
> . local myx "x1 x2 x3 x4 x5 x6 x7 x8 x9 x10"
> . regress y `myx' 
> However, depending on the order of your variables, 
> . regress y x1-x10 
> may be equivalent; when that it is true, this syntax is in my view
> preferable. 
Wanli Zhao
> > Could I create a list of
> > variables I use in common in some regressions? For instance, x1, 
> > x2,...,x10 are the variables I always use in 5 regressions. To save 
> > typing, could I generate a shortcut named "control", which includes 
> > all those variables so that I only use the name "control" in the 
> > regressions? In Eviews, it is called a "group" of 
> variables. My search 
> > did not give me anything.

*   For searches and help try:

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