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: RE: grouping cases
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: grouping cases
Date
Fri, 7 Oct 2011 16:57:43 +0100
Not much, but see
FAQ . . . . . . . . . . . Defining group characteristics to create subsets
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C. F. Baum
7/11 How do you efficiently define group characteristics
in your data in order to create subsets?
http://www.stata.com/support/faqs/data/characteristics.html
Nick
[email protected]
Yang, Chongmin
I want to choose oecd members from all countries and make dummy variables.
So I wrote like this way:
gen oecd=1 if country=="Australia" | country=="Austria" |
country=="Belgium" | country=="Canada" | country=="Chile" |
country=="Czech Republic" | country=="Denmark" | country=="Estonia" |
country=="Finland" | country=="France" | country=="Germany" |
country=="Greece" | country=="Hungary" | country=="Iceland" |
country=="Ireland" | country=="Israel" | country=="Italy" |
country=="Japan" | country=="Korea, Republic of" |
country=="Luxembourg" | country=="Mexico" | country=="Netherlands" |
country=="New Zealand" | country=="Norway" | country=="Poland" |
country=="Portugal" | country=="Slovakia" | country=="Slovenia" |
country=="Spain" | country=="Sweden" | country=="Switzerland" |
country=="Turkey" | country==" United Kingdom" | country=="United
States"
replace oecd=2 if oecd==.
Is there more efficient way than mine? I think it's very tough to make
variables.
*
* 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/