Question

Status:Closed    Asked:Oct 07, 2015 - 11:29 AM

What are the numeric codes for countries on IPUMS? For example, if I want to drop a country from sample on STATA.

I need to clean the data I have on STATA by looking at what countries may not necessarily have the data I am looking for. I am a STATA beginner. I want to be able to make commands to drop countries, but simply writing: drop if country==Indonesia does not work since i am guessing each country has a numeric code. I've used tab country, no label to see codes but these are not recognized. For example, it seems like Argentina's code is 32 but if I type: drop if country==32, 32 is considered unrecognized. Thanks in advance for your help!

 
Do you have the same question? Follow this Question
 

Staff Answer

avatar

Tim_Moreland

Staff

You can find the numeric country codes here. Your STATA syntax for dropping a country is correct (drop if country==32). I recommend double-checking that your STATA code exactly matches this syntax. Also, confirm that you have not inadvertently changed the data type of the COUNTRY variable from numeric to string, which would cause an error of "32 not found".


Hope this helps.

 

Oct 07, 2015 - 12:56 PM

0
0
Report it

OTHER QUESTIONS NEEDING ANSWERS

More recent climate data?
JTYEARAGO coding?
Info on non-primary occupation in CPS?
When did IPUMS-CPS start like the way (easily downloadable way) like now?
Replicate weights for use with CPS-TUS
Longitudinal cohort in TUS 2014/2015?
Login   |   Register

Recently Active Members

View More »

Share |