Bookmark and Share

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]

RE: st: Creating dummy variables for country dataset


From   DE SOUZA Eric <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: Creating dummy variables for country dataset
Date   Sat, 15 Jan 2011 22:19:35 +0100

webuse grunfeld
gen company2 = 0
replace company2 = 1 if company == 2

The variable company numbers companies from 1 to ...
The above creates a variable company2 which equals 0 everywhere except for company number 2

Eric


Eric de Souza
College of Europe
Brugge (Bruges), Belgium
http://www.coleurope.eu

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Saudamini Dabak
Sent: 15 January 2011 18:12
To: [email protected]
Subject: <SPAM>st: Creating dummy variables for country dataset

 Hi


thanks for the help earlier!


i need to create dummy variables for 3 countries out of 213 from a panel data with 6 variables. I tried using the tabulate function but that generates dummy variables for all the countries, which is very cumbersome.

Any ideas, other than retrying in excel?

thanks a tonne!

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index