Hello everybody,
I am estimating effects of WTO accession on Vietnam's trade flows bu using the gravity model approach. The data consists of Vietnam's exports (EX) and imports (IM) (separately) with 71 partner countries from 1990 to 2015 .
I am estimating PPML so my dependent variables are in levels and rescaled by 1000 i.e EX = EX_ijt/1000 and IM=IM_ijt/1000. My independent variables are: distance, real of Exchange rate (RER), common border, colony, comcol, smctry, RTA, VNin( dummy=1 if t=2007 to 2015) and Partin( dummy=1 if Vietnam's partner country is GATT/WTO in year t).
I have declared my data to a panel data by command: xtset Coutry1 Year and my data is strongly balanced.
* (1) For estimating PPML without fixed effects (FE), I use the following command:
ppml EX lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt, cluster(distcap)
ppml IM lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt, cluster(distcap)
* (2) For estimating PPML With year FE I use:
xtpqml EX lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt Year_*, fe cluster(distcap)
xtpqml IM lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt Year_*, fe cluster(distcap)
* (3) For estimating PPML With country-pair FE I use:
xtpqml EX lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt pair_* , fe cluster(distcap)
xtpqml IM lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt pair_* , fe cluster(distcap)
*(4) For estimating PPML With both country-pair FE and year FE I use:
xtpqml EX lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt pair_* Year_* , fe cluster(distcap)
xtpqml IM lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt pair_* Year_*, fe cluster(distcap)
I have these following problems:
1) When I estimate using (2) With year FE, the time-invariant variables drop as they are supposed to, but lnGDP_it also drops which is surprsing to me . Is it correct?
2) I have managed to estimate EX both w/o, With year FE, With country-pair FE and also With country-pair + year FE (all 4) and IM for PPML w/o FE and With year FE , but when I estimate PPML With country-pair I get an r(200) saying that there are no observations. To fix this error, some suggest that I have to change from the variables from string to numeric and I am pretty sure this is not my case. Some suggest that this error comes because I have missing values and I do have many missing values, but how can I fix it without changing them to, for instance, 1?
I am really sorry for such a long post but I hope you guys understand what I have trouble With and please help me to fix them! I have to hand in my Master thesis in about 2 weeks
I am estimating effects of WTO accession on Vietnam's trade flows bu using the gravity model approach. The data consists of Vietnam's exports (EX) and imports (IM) (separately) with 71 partner countries from 1990 to 2015 .
I am estimating PPML so my dependent variables are in levels and rescaled by 1000 i.e EX = EX_ijt/1000 and IM=IM_ijt/1000. My independent variables are: distance, real of Exchange rate (RER), common border, colony, comcol, smctry, RTA, VNin( dummy=1 if t=2007 to 2015) and Partin( dummy=1 if Vietnam's partner country is GATT/WTO in year t).
I have declared my data to a panel data by command: xtset Coutry1 Year and my data is strongly balanced.
* (1) For estimating PPML without fixed effects (FE), I use the following command:
ppml EX lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt, cluster(distcap)
ppml IM lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt, cluster(distcap)
* (2) For estimating PPML With year FE I use:
xtpqml EX lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt Year_*, fe cluster(distcap)
xtpqml IM lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt Year_*, fe cluster(distcap)
* (3) For estimating PPML With country-pair FE I use:
xtpqml EX lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt pair_* , fe cluster(distcap)
xtpqml IM lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt pair_* , fe cluster(distcap)
*(4) For estimating PPML With both country-pair FE and year FE I use:
xtpqml EX lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt pair_* Year_* , fe cluster(distcap)
xtpqml IM lnGDP_it lnGDP_jt lnDist lnRER_ijt contig colony comcol smctry RTA_ijt Vnin_jt Partin_jt pair_* Year_*, fe cluster(distcap)
I have these following problems:
1) When I estimate using (2) With year FE, the time-invariant variables drop as they are supposed to, but lnGDP_it also drops which is surprsing to me . Is it correct?
2) I have managed to estimate EX both w/o, With year FE, With country-pair FE and also With country-pair + year FE (all 4) and IM for PPML w/o FE and With year FE , but when I estimate PPML With country-pair I get an r(200) saying that there are no observations. To fix this error, some suggest that I have to change from the variables from string to numeric and I am pretty sure this is not my case. Some suggest that this error comes because I have missing values and I do have many missing values, but how can I fix it without changing them to, for instance, 1?
I am really sorry for such a long post but I hope you guys understand what I have trouble With and please help me to fix them! I have to hand in my Master thesis in about 2 weeks

Comment