I have recently used a very simple comand to generate a new variable.
gen MFN_zero = ImportValue if AVDutyRate2==0
gen MFN_non_zero= ImportValue if AVDutyRate2!=0
Here is an excerpt from the data and the new variable generated. As you can see is that the value of the old variable and the new variable are not the same.
I have a big panel and it works fine for most year-country-partner combinations.
I will use a more specific code from now on but just wanted to flag is here since I was suprised to see this outcome.
Best wishes,
Carlotta
Year | ReporterCode | Reporter | PartnerCode | Partner | HSCode | AVDutyRate2 | ImportValue | MFN_zero | MFN_non_zero |
2011 | 840 | United States of America | 24 | Angola | 27090020 | 10708064000 | 10708064256 | ||
2017 | 840 | United States of America | 24 | Angola | 27090020 | 0 | 1928211000 | 1928210944 |
0 Response to Issues with inaccurate generate of a new variable
Post a Comment