Statalist


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

st: simple question


From   "Sebastián Daza" <[email protected]>
To   [email protected]
Subject   st: simple question
Date   Tue, 23 Dec 2008 09:33:59 -0300

Hi everyone,
I need to create dummy or indicator variables (0,1) for a period
variable (years, age) with the following format:

age
4
5
6
7
10
11
14
15

=> d4 d5 d6 d7 d10 and so on... and their respective 0 and ones

It's important that the name of the variable has the age name. When I
use command tab gen, the name of the variable doesn't match with the
age name (age 4 = d4). Is there a loop or repeat command to create
indicator variables?

Thank you.
Regards.


-- 
Sebastián Daza Aranzaes
Sociólogo UC
[email protected]

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



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