Dear Statalisters,
I'm a PhD student working on the gravity equation for trade and income analysis.
I'm running a gravity equation for a panel with around 50,000 country pairs for 20 years. Also, my equation includes lots of interaction variables (interact with year dummy), that were used to convert time-invariant variables into time-variant variables.
I found it impossible to impose pair fixed effects in ppml and hence I’m trying on work with ppmlhdfe.
I use the following ppmlhdfe command and predict fitppmlhd, mu to predict the trade values, which I will use to instrument actual trade values in the income regression.
ppmlhdfe trade_actual ldisyear1 ldisyear2 ldisyear3 ldisyear4 lsdisyear1 lsdisyear2 lsdisyear3
lsdisyear4 ///
ldpop_o ldpop_d ///
lareao_year1 lareao_year2 lareao_year3 lareao_year4 ///
laread_year1 laread_year2 laread_year3 laread_year4 ………bpop_o bpop_d, a(FE1=imp#year FE2= exp#year, save ) standardize_data(0)d vce(cluster idpair) nolog
predict fitppmlhd, mu
trade_predict= fitppmlhd
The problem currently I’m facing is when I use the predict fitppmlhd, mu, I can generate fitted values only for when actual trade>0. Actually, I want to generate fitted values for all the potential pairs using gravity variables. For example, if trade between AUS JPN for 2001 is “ .”, still I want to generate a fitted value for trade between AUS JPN for 2001. However, ppml command and predict fitppml, mu generates fitted values for all country pairs.
Your advice is greatly appreciated.
Thank you
Niluka
I'm a PhD student working on the gravity equation for trade and income analysis.
I'm running a gravity equation for a panel with around 50,000 country pairs for 20 years. Also, my equation includes lots of interaction variables (interact with year dummy), that were used to convert time-invariant variables into time-variant variables.
I found it impossible to impose pair fixed effects in ppml and hence I’m trying on work with ppmlhdfe.
I use the following ppmlhdfe command and predict fitppmlhd, mu to predict the trade values, which I will use to instrument actual trade values in the income regression.
ppmlhdfe trade_actual ldisyear1 ldisyear2 ldisyear3 ldisyear4 lsdisyear1 lsdisyear2 lsdisyear3
lsdisyear4 ///
ldpop_o ldpop_d ///
lareao_year1 lareao_year2 lareao_year3 lareao_year4 ///
laread_year1 laread_year2 laread_year3 laread_year4 ………bpop_o bpop_d, a(FE1=imp#year FE2= exp#year, save ) standardize_data(0)d vce(cluster idpair) nolog
predict fitppmlhd, mu
trade_predict= fitppmlhd
The problem currently I’m facing is when I use the predict fitppmlhd, mu, I can generate fitted values only for when actual trade>0. Actually, I want to generate fitted values for all the potential pairs using gravity variables. For example, if trade between AUS JPN for 2001 is “ .”, still I want to generate a fitted value for trade between AUS JPN for 2001. However, ppml command and predict fitppml, mu generates fitted values for all country pairs.
Your advice is greatly appreciated.
Thank you
Niluka