Dear All,
I am working on a bilateral data of the form;
exporter importer year trade
Germany France 2002 10000
I am trying to create a dummy following the pair of countries in the global and local sets below.
global EU "AUT BEL BGR CYP CZE DEU DNK ESP EST FIN FRA GBR GRC HRV HUN IRL ITA LTU LUX MLT NLD POL PRT ROU SVK SVN SWE CHE"
local ECOWAS "GHA BEN NGA BFA SEN CIV CPV GMB GIN GNB MLI NER TGO LBR SLE"
Hence I used the command;
foreach x of local EU & y of global ECOWAS {
gen DIV_EU=1 if exporter="x" & importer="y"
}
The above command seems not to work. Any suggestions
Related Posts with Using foreach for two set of groups
Dummies on filter events scores and frequency Hello stata users, I am having a panel of groups and need to filter them to positive and not posi…
Losing data when controlling for variables, and how to decide on best model?Hi all I've a trying to estimate the effect of 'economic equality' (X) on whether you want to have …
How to deal with categorical variable (a group of dummy vars) in Multilevel model?Hi there, I'm working on a dataset with individual-level and school-level variables using multileve…
Plotting estimates from -ir- and -iri-Dear Statalisters, Is there a way to plot the IRR and 95%CI after using either Code: ir or Code: …
ppml_panel_sg and r(3203)Hello, I am analyzing the impact of tariffs on trade using ppml_panel_sg, and an r(3203) error some…
Subscribe to:
Post Comments (Atom)
0 Response to Using foreach for two set of groups
Post a Comment