Hello everybody,
I am new to Stata, but I need to use it for my bachelor thesis. I have recently come across a problem with my code in which I am trying to create a dummy value if one country is part of the eurozone in order to see the effects of a monetary union on trade. I am using the CEPII gravity database plus the years in which the eurozone countries have adopted the euro. Both the time variables are correct yet when I try to do the following code
"gen EMU_one_sided = ((eurozone_join_o <= year & eurozone_join_d > year) | (eurozone_join_d <= year & eurozone_join_o > year))" I only get 0s.
I have also tried to do it using this:
"gen eurozone_o = eurozone_join_o <= year
gen eurozone_d = eurozone_join_d <= year
gen EMU_one_sided = (eurozone_o != eurozone_d)"
Does anyone knows what I am doing wrong or what I can do in order to get a normal variation since there have to be countries that are in the eurozone trading with non-members.
(I have replaced all the missing values for the eurozone_join_o and eurozone_join_d variables with 2042 for countries not part of the eurozone)
I am new to Stata, but I need to use it for my bachelor thesis. I have recently come across a problem with my code in which I am trying to create a dummy value if one country is part of the eurozone in order to see the effects of a monetary union on trade. I am using the CEPII gravity database plus the years in which the eurozone countries have adopted the euro. Both the time variables are correct yet when I try to do the following code
"gen EMU_one_sided = ((eurozone_join_o <= year & eurozone_join_d > year) | (eurozone_join_d <= year & eurozone_join_o > year))" I only get 0s.
I have also tried to do it using this:
"gen eurozone_o = eurozone_join_o <= year
gen eurozone_d = eurozone_join_d <= year
gen EMU_one_sided = (eurozone_o != eurozone_d)"
Does anyone knows what I am doing wrong or what I can do in order to get a normal variation since there have to be countries that are in the eurozone trading with non-members.
(I have replaced all the missing values for the eurozone_join_o and eurozone_join_d variables with 2042 for countries not part of the eurozone)
Comment