I am evaluating the effect of Grab's entry in Vietnam on firm performance indicators such as gross profit using a difference-in-difference design. To visualize the parallel trends assumption, I need to make a graph showing how the values of gross profit change for province per year.
I ran the following command:
Code:
xtreg grossprofit2 placetimedummy i.year##i.provinc
Code:
xtreg grossprofit2 placetimedummy i.year##i.provinc note: 2015.year#80.provinc omitted because of collinearity Random-effects GLS regression Number of obs = 2,554 Group variable: firmid Number of groups = 867 R-sq: Obs per group: within = 0.0065 min = 1 between = 0.0328 avg = 2.9 overall = 0.0256 max = 3 Wald chi2(14) = 40.55 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0002 --------------------------------------------------------------------------------- grossprofit2 | Coef. Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- placetimedummy | 1408.406 196247.1 0.01 0.994 -383228.7 386045.6 | year | 2013 | 115433.1 117971.8 0.98 0.328 -115787.4 346653.5 2015 | 116295 155326.6 0.75 0.454 -188139.5 420729.4 | provinc | Hai Phong | 55391.53 205587.9 0.27 0.788 -347553.4 458336.5 Khanh Hoa | -256938.5 268226.2 -0.96 0.338 -782652.1 268775.1 HCMC | 450535.3 165177.6 2.73 0.006 126793.1 774277.4 Long An | -346668.4 227219.2 -1.53 0.127 -792009.9 98673.09 | year#provinc | 2013#Hai Phong | -334925.7 177399.3 -1.89 0.059 -682621.9 12770.51 2013#Khanh Hoa | 175364 230810.5 0.76 0.447 -277016.3 627744.3 2013#HCMC | -149433.5 142382.3 -1.05 0.294 -428497.6 129630.6 2013#Long An | -118933.7 197166.2 -0.60 0.546 -505372.3 267504.9 2015#Hai Phong | -345398.7 204305.2 -1.69 0.091 -745829.6 55032.08 2015#Khanh Hoa | 11192.34 251957.3 0.04 0.965 -482634.9 505019.6 2015#HCMC | -26003.57 143888.4 -0.18 0.857 -308019.7 256012.5 2015#Long An | 0 (omitted) | _cons | 709729.5 137203.6 5.17 0.000 440815.4 978643.5 ----------------+---------------------------------------------------------------- sigma_u | 1435055.7 sigma_e | 1090994.5 rho | .63372441 (fraction of variance due to u_i) ---------------------------------------------------------------------------------
After that, I ran the margins command:
Code:
margins year#provinc
Code:
. margins year#provinc Predictive margins Number of obs = 2,554 Model VCE : Conventional Expression : Linear prediction, predict() --------------------------------------------------------------------------------- | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] ----------------+---------------------------------------------------------------- year#provinc | 2011#Ha Noi | . (not estimable) 2011#Hai Phong | . (not estimable) 2011#Khanh Hoa | . (not estimable) 2011#HCMC | . (not estimable) 2011#Long An | . (not estimable) 2013#Ha Noi | . (not estimable) 2013#Hai Phong | . (not estimable) 2013#Khanh Hoa | . (not estimable) 2013#HCMC | . (not estimable) 2013#Long An | . (not estimable) 2015#Ha Noi | . (not estimable) 2015#Hai Phong | . (not estimable) 2015#Khanh Hoa | . (not estimable) 2015#HCMC | . (not estimable) 2015#Long An | . (not estimable) ---------------------------------------------------------------------------------
Is there any way for me to fix this? Alternatively, is there another command I can use that can also help me visualize parallel trends?
Thank you in advance!
Note: This is my first time posting to the forum. If I missed anything that should be included, please let me know and I will upload any information needed as soon as possible.
0 Response to Margins for DiD return not estimable!
Post a Comment