Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: AW: local macro
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: AW: local macro
Date
Tue, 27 Apr 2010 17:48:49 +0200
<>
As you said yourself, -global-s will serve you better, if you really want to
run the do-file piecewise. I think the distinction is very clearly set out
in [U], 18.3.3. which you can access as a Stata 11 user in your pdf manuals.
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Ekaterina
Hertog
Gesendet: Dienstag, 27. April 2010 17:18
An: [email protected]
Betreff: st: local macro
Dear all,
I was wondering if you could help me clarify something about local
macros. I use Stata 11. I have a log do file with probably 100
regressions. I am essentially testing 2 models the 2nd one being an
extension of the first in a sense that I use all the variables that
proved important in the first model and add some new ones. To make
editing easier once I finalised the first model I created a local macro
which is a list of variables used in the first model and used it when
running out the regressions of the second model. It works fine if I run
my whole do file continuously. However, when I want to run just a few lines:
e.g. the line with a local macro and some regressions a few paragraphs
down which use the macro in question
Stata does not seem to recognise my local macro.
Here is a sample of my commands:
local streglist prsexratio2039 citotalgen osaka age agesq height weight
income smoker withfam university goodhealth face3 sightprobl
strongintnumb intsexratio
streg `streglist' nodes desartokyo desosaka mindesinc if age<=40,
dist(gamma) nolog
I just wanted to confirm is it possible to use a local macro the way I
was trying to and in that case what am I doing wrong? Or is it
impossible and I should set a global macro instead?
I will be very grateful for any advice,
Sincerely yours,
Ekaterina
--
Ekaterina Hertog (née Korobtseva)
Career Development Fellow
Department of Sociology and Nissan Institute of Japanese Studies
University of Oxford
27 Winchester Road
Oxford
OX2 6NA
United Kingdom
*
* 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/