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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: Re: abbreviating a variable list in regression commands |

Date |
Wed, 25 Mar 2009 18:55:39 +0100 |

<> Use a -local-: **** sysuse auto, clear local myregressors " weight length turn displacement" regress price weight length turn displacement *equivalently regress price `myregressors' ***** HTH Martin _______________________

To: <statalist@hsphsun2.harvard.edu> Sent: Wednesday, March 25, 2009 6:49 PM Subject: st: abbreviating a variable list in regression commands

dear all:i am wondering how to use an abbreviation for a long list of explanatoryvariables in a regression command (for the purpose of repeating it).for example, consider the command: reg y xyz qwe abcif I want to use z to refer to the list "xyz qwe abc" so that I can writesomething shorter such as:reg y zI am not quite clear about the exact syntax that would work. Thanks a lotfor your help.Shuaizhang * * 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/

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

**References**:**st: abbreviating a variable list in regression commands***From:*Shuaizhang Feng <fengsz@yahoo.com>

- Prev by Date:
**st: binary proportions and sample size** - Next by Date:
**Re: st: abbreviating a variable list in regression commands** - Previous by thread:
**st: abbreviating a variable list in regression commands** - Next by thread:
**Re: st: abbreviating a variable list in regression commands** - Index(es):

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