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
How to fit GLM models with two independent variables and two moderators?Dear Stata experts, I'm trying to test several GLM models. I have two independent variables (X and …
Loop Error When Mathematical Functions Performed on LocalI am trying to do the following: Code: local i 10 local j 20 quietly summ n local t r…
showing mean of a variable over several variable and categoryIn short: I want to plot the mean of variable Y over variable X_1 to X_9. Each variable is a dummy …
Documentation for graphic schemesDear All, Is there a formal documentation for creating new graphics schemes? The Stata documentatio…
Gravity model with GEPPML: General equilibrium analysis with PPMLDear All, I am applying the method of General equilibrium analysis with Poisson pseudo-maximum-like…
Subscribe to:
Post Comments (Atom)
0 Response to Using foreach for two set of groups
Post a Comment