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

Re: st: using variable list instead of listing all variables?


From   Jean-Benoit Hardouin <jean-benoit.hardouin@orscentre.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: using variable list instead of listing all variables?
Date   Mon, 16 Jan 2006 19:55:33 +0100

For example
. reg a b* c
. reg a b1-b3 c

Jean-Benoit

Clive Nicholas a écrit :

Shuaizhang Feng wrote:



I have a simple question. In a regression command
like "reg", if I do not want to list all the variables
but just use an abbreviation, how should I do it. For
example,

reg a b1 b2 b3 c

can I do something like reg a all_b_s c

Use -local- macros. For example:

. local myvars "b1 b2 b3"
. reg a 'myvars' c

For more, see -whelp macros-. Hope that helps.

CLIVE NICHOLAS |t: 0(044)7903 397793
Politics |e: clive.nicholas@ncl.ac.uk
Newcastle University |http://www.ncl.ac.uk/geps

Whereever you go and whatever you do, just remember this. No matter how
many like you, admire you, love you or adore you, the number of people
turning up to your funeral will be largely determined by local weather
conditions.

*
* 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/





--
***************************************************************************
Jean-Benoit Hardouin
Biostatisticien
Observatoire Régional de la Santé du Centre
BP 2439
1, rue Porte Madeleine
45032 Orléans Cedex 1
tél : 02 38 74 48 80
fax : 02 38 74 48 81
Email : jean-benoit.hardouin@orscentre.org
**************************************************************************

*
*   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–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index