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

st: macro basics


From   Chris Rohlfs <[email protected]>
To   [email protected]
Subject   st: macro basics
Date   Thu, 25 Jul 2002 16:38:02 -0500 (CDT)

hi.

i'm trying to figure out the macro basics & can't seem to find any simple
examples on the web or in the manual.  if someone could please post the
text of a simple *.do file that uses macros, i'd really really appreciate
it.  i'm using stata 7.

i'd also really appreciate any suggestions on my specific problem that i'm
trying to solve w/ macros:

to take variables (air_reg1, air_reg2, ..., air_reg24)
and (voc_reg1, ..., voc_reg24)

and to produce the sum of the products:

air_reg1*voc_reg1 + air_reg2*voc_reg2 + ... + air_reg24*voc_reg24

for a bunch of different sets of variables ({air,voc} is one example) w/ a
large dataset.

thanks so much!
chris

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