Dear all
Thanks for helping me in advance. I guess my problem is not that difficult to solve. Yet I was not able to find the right command so far.
I ran a simple OLS and PPML regression to see the relation between trade flows and GDP of the two specific countries.
Here is a simple regression's command for my analysis:
xi: reg lntrade lngdprep lngdppar dum_FTA i.commodity
ppmlhdfe lntrade lngdprep lngdppar dum_FTA , a(i.commoditycode) savefe
I used the data from 1990-2000 for my analysis. I would like to obtain the predicted (fitted) values of trade flows using the GDP values of 2000-2005 after regression.
And then, I would like to compare the real and counterfactual numbers.
To do that, I typed the following command for OLS, but stata cannot recognize the dummy variables, "i.comoditycode."
Just for your information, HS 6-digit trade data was used for the analysis. And there are only two countries, so I add industry fixed effect only.
gen yhhat=_b[lngdprep]*lngdprep+_b[lngdppar]*lngdppar+_b[dum_FTA]*dum_FTA+_b[i.commoditycode*]*i.commoditycode*+_b[_cons]
I've tried predict command but, this does not generate the counterfactual but fitted values.
I would appreciate any responses.
Thank you in advance for any help.
Related Posts with Obtaining predicted values after regression
Panel Data model interpretation: Choosing between FE and REHi. I have a long panel, that is my T is 16 and N=8. Where the dependent variable is number of under…
A question from an absolute beginner: hospitalization dataHi everybody. I have a set of hospital discharge records (time window 2001-2016) with the main diagn…
Multivariate Regression value higher than univariate?This is a simple question: I have done a small research study where I had a significant (Logistic re…
bar chart comparing mean to a constant variableDear Stata Community, I am looking to create a bar graph similar to that below. For simplicity, I w…
change in sign and significance of linear term after adding quadratic and cubic termsHi all, I need your comments on change in sign and significance of linear term after adding quadrat…
Subscribe to:
Post Comments (Atom)
0 Response to Obtaining predicted values after regression
Post a Comment