Hi guys,
I am a Stata beginner and have a problem in generating a dummy called aggregate.
I tried it with inlist(), but as my list is very long I get an error message "Expression too long".
This is my code:
#delimit ;
gen aggregate = inlist(countryname,"Arab World", "Caribbean small states",
"Central Europe and the Baltics",
"East Asia & Pacific (all income levels)",
"East Asia & Pacific (developing only)",
"Euro area", "Europe & Central Asia (all income levels)",
"Europe & Central Asia (developing only)",
"Europe and Central Asia (IFC classification)",
"European Union", "Fragile and conflict affected situations",
"Heavily indebted poor countries (HIPC)",
"High income", "High income: nonOECD", "High income: OECD",
"Latin America & Caribbean (all income levels)",
"Latin America & Caribbean (developing only)",
"Latin America and the Caribbean (IFC classification)",
"Least developed countries: UN classification",
"Low & middle income", "Low income", "Lower middle income",
"Middle East & North Africa (all income levels)",
"Middle East & North Africa (developing only)",
"Middle income", "North America", "OECD members",
"Other small states", "Pacific island small states",
"Small states", "South Asia",
"Sub-Saharan Africa (all income levels)",
"Sub-Saharan Africa (developing only)",
"Upper middle income", "World"
),;
#delimit cr
Is there any smarter way to do that?
0 Response to Inlist Expression too long
Post a Comment