Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: abbreviating a variable list in regression commands


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: abbreviating a variable list in regression commands
Date   Wed, 25 Mar 2009 17:55:05 +0000 (GMT)


-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


--- On Wed, 25/3/09, Shuaizhang Feng wrote:
> i am wondering how to use an abbreviation for a long list
> of explanatory variables in a regression command (for the
> purpose of repeating it).
> 
> for example, consider the command:
> 
> reg y xyz qwe abc
> 
> if I want to use z to refer to the list "xyz qwe
> abc" so that I can write something shorter such as:
> 
> reg y z

local z "xyz qwe abc"
reg y `z'

Hope this helps,
Maarten


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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