Dear gravity-experts,
Dear stata-community,
in the context of my thesis i am investigating the change of linguistic coefficients in the classical gravity model over time.
The following regressions all provide an R2 > 0.84 and provide significant results for the investigated language parameters.
I am now wondering if I have included the right control variables (OLS and PPML) and applied the fixed effects correctly.
Also, I am not sure if the ppmlhdfe regression has the correct syntax (stata does not give any error message so far).
variables
exporter: country a
importer: country b
pair_id: has the same value whether ARG trades with GER or GER with ARG, indentifies the country pairs
year: reaching observations from 1986-2006
trade: tradeflows between exporter and importer
DIST: distance between the countries
CNTG: countries that share a common border
LANG: common official language, binary
col: binary measure of common official language
cnl: continuous index in [0, 1] reflecting the likelihood that two people selected at random from populations i and j will speak the same native language
lp: continuous index in [0, 1] measuring how similar the languages spoken are
cl: continuous index in [0, 1] computed as the simple average of col cnl and lp
I would be very pleased about a short feedback.
regards
Marvin
Dear stata-community,
in the context of my thesis i am investigating the change of linguistic coefficients in the classical gravity model over time.
The following regressions all provide an R2 > 0.84 and provide significant results for the investigated language parameters.
I am now wondering if I have included the right control variables (OLS and PPML) and applied the fixed effects correctly.
Also, I am not sure if the ppmlhdfe regression has the correct syntax (stata does not give any error message so far).
variables
exporter: country a
importer: country b
pair_id: has the same value whether ARG trades with GER or GER with ARG, indentifies the country pairs
year: reaching observations from 1986-2006
trade: tradeflows between exporter and importer
DIST: distance between the countries
CNTG: countries that share a common border
LANG: common official language, binary
col: binary measure of common official language
cnl: continuous index in [0, 1] reflecting the likelihood that two people selected at random from populations i and j will speak the same native language
lp: continuous index in [0, 1] measuring how similar the languages spoken are
cl: continuous index in [0, 1] computed as the simple average of col cnl and lp
I would be very pleased about a short feedback.
regards
Marvin
Code:
use "C:\Users\marvin.haas\Desktop\Bachelor Regression\merged_dataset1.dta"
ssc install ppml
ssc install ftools
ssc install reghdfe
ssc install ppmlhdfe
keep if year == 1986 | year == 1990 | year == 1994 | year == 1998 | year == 2002 | year == 2006
generate ln_DIST = ln(DIST)
generate ln_trade = ln(trade)
forvalues i = 1986(1)2006{
generate LANG_`i' = LANG if year == `i'
replace LANG_`i' = 0 if LANG_`i' == .
}
forvalues i = 1986(1)2006{
generate cnl_`i' = cnl if year == `i'
replace cnl_`i' = 0 if cnl_`i' == .
}
forvalues i = 1986(1)2006{
generate lp_`i' = lp if year == `i'
replace lp_`i' = 0 if lp_`i' == .
}
egen exp_time = group(exporter year)
quietly tabulate exp_time, gen(EXPORTER_TIME_FE)
egen imp_time = group(importer year)
quietly tabulate imp_time, gen(IMPORTER_TIME_FE)
*OLS regressions
regress ln_trade ln_DIST EXPORTER_TIME_FE* IMPORTER_TIME_FE* LANG_1986 LANG_1990 LANG_1994 LANG_1998 LANG_2002 LANG_2006 CNTG CLNY if exporter != importer, cluster(pair_id)
regress ln_trade ln_DIST EXPORTER_TIME_FE* IMPORTER_TIME_FE* cnl_1986 cnl_1990 cnl_1994 cnl_1998 cnl_2002 cnl_2006 CNTG CLNY LANG if exporter != importer, cluster(pair_id)
regress ln_trade ln_DIST EXPORTER_TIME_FE* IMPORTER_TIME_FE* lp_1986 lp_1990 lp_1994 lp_1998 lp_2002 lp_2006 CNTG CLNY LANG if exporter != importer, cluster(pair_id)
*Poisson pseudo maximum likelihood regressions
ppmlhdfe trade ln_DIST LANG_1986 LANG_1990 LANG_1994 LANG_1998 LANG_2002 LANG_2006 CLNY, absorb(exp_time imp_time) d
ppmlhdfe trade ln_DIST cnl_1986 cnl_1990 cnl_1994 cnl_1998 cnl_2002 cnl_2006 CLNY CNTG LANG, absorb(exp_time imp_time) d
ppmlhdfe trade ln_DIST lp_1986 lp_1990 lp_1994 lp_1998 lp_2002 lp_2006 CLNY CNTG LANG, absorb(exp_time imp_time) d

Comment