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

[no subject]



Dear Statalisters,

I have the following dummies 
gen dummy1 = 1 if nearesthospital ==1
gen dummy2 = 1 if nearesthospital ==2
gen dummy3 = 1 if nearesthospital ==3
gen dummy4 = 1 if nearesthospital ==4
gen dummy5 = 1 if nearesthospital ==5
Etc. etc.

The number of dummies that have to be generated are up to 40 or more. I
was thus thinking of creating a local macro for generating the dummies
and avoiding typing the commands every single time. I read the macro
section on the Stata User's Guide, but unfortunately cannot see how to
apply the explanations to the above-mentioned case. Any idea?

Thank you very much,
Ilaria

Met inachtneming van eventuele beperkende bepalingen in deze e-mail, mag
u deze informatie gebruiken voor het doel waarvoor u die ontvangt. Aan
deze gegevens kunnen geen rechten worden ontleend. CTG/ZAio aanvaardt
geen aansprakelijkheid voor de juistheid en volledigheid van deze
gegevens. Enige schade, ontstaan door de ontvangst of het gebruik van
dit e-mailbericht of de informatie daarin, komt voor uw eigen
verantwoordelijkheid.


*

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept 
**********************************************************************



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