Good morning everyone,
I am using Stata 13.0; I have a panel dataset of 60605 observations. I have to analyze the impact of free trade agreement (trade creation and trade diversion effect) on trade.
Reporters include states of the USA and partners are different countries in the world. My dependent variable is export of vegetables. However there is a lot of trade zero values (I don't have any explanations of the zeros trade so far). precisely 55536 observations have 0 values.
Now my boss asked my to reduce the number of zeros to 50% if possible in order to estimates our gravity panel equations first using OLS (mainly for comparison with the appropriate estimators).
What the appropriate method /correct Stata syntax to reduce my panel dataset (removing zeros without messing up the panel structure).
Here is a look a my dataset (small portions)
here is the summary statisctics
Please let me know what and how I can do it. if there is something I need to show you to be able to help me, I will do it. I have never dealt with so many zeros before.
Thanks again for your help.
I am using Stata 13.0; I have a panel dataset of 60605 observations. I have to analyze the impact of free trade agreement (trade creation and trade diversion effect) on trade.
Reporters include states of the USA and partners are different countries in the world. My dependent variable is export of vegetables. However there is a lot of trade zero values (I don't have any explanations of the zeros trade so far). precisely 55536 observations have 0 values.
Now my boss asked my to reduce the number of zeros to 50% if possible in order to estimates our gravity panel equations first using OLS (mainly for comparison with the appropriate estimators).
What the appropriate method /correct Stata syntax to reduce my panel dataset (removing zeros without messing up the panel structure).
Here is a look a my dataset (small portions)
HTML Code:
. list YEAR QUARTER REPORTINGCOUNTRY STATE PARTNERCOUNTRY VALUE , sepby ( YEAR ) +--------------------------------------------------------------------------------------------------+ | YEAR QUARTER REPORTIN~Y STATE PARTNERCOUNTRY VALUE | |--------------------------------------------------------------------------------------------------| 1. | 1996 1 U.S. State Alabama Grenada 0 | 2. | 1996 2 U.S. State Alabama Grenada 0 | 3. | 1996 3 U.S. State Alabama Grenada 0 | 4. | 1996 4 U.S. State Alabama Grenada 0 | |--------------------------------------------------------------------------------------------------| 5. | 1997 1 U.S. State Alabama Grenada 0 | 6. | 1997 2 U.S. State Alabama Grenada 0 | 7. | 1997 3 U.S. State Alabama Grenada 0 | 8. | 1997 4 U.S. State Alabama Grenada 0 | |--------------------------------------------------------------------------------------------------| 9. | 1998 1 U.S. State Alabama Grenada 0 | 10. | 1998 2 U.S. State Alabama Grenada 0 | 11. | 1998 3 U.S. State Alabama Grenada 0 | 12. | 1998 4 U.S. State Alabama Grenada 0
here is the summary statisctics
Code:
sum YEAR QUARTER VALUE Kilograms Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- YEAR | 60605 2006.129 6.135364 1996 2017 QUARTER | 60605 2.482353 1.123154 1 4 VALUE | 60605 14987.31 280650.2 0 1.59e+07 Kilograms | 60605 13937.74 235654.2 0 1.29e+07 . sum VALUE Kilograms if VALUE==0 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- VALUE | 55536 0 0 0 0 Kilograms | 55536 0 0 0 0
Thanks again for your help.
Comment