I am currently working with a country-sector-year panel data-set, which contains values for labour productivity (lp). The data looks as follows (I only include decade data so it becomes clear that my dataset consists of multiple countries and sectors):
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str8 country int year str4 sector float lp "ARG" 1960 "AGR" 4127.994 "ARG" 1970 "AGR" 5716.049 "ARG" 1980 "AGR" 7340.645 "ARG" 1990 "AGR" 7826.752 "ARG" 2000 "AGR" 11798.175 "ARG" 2010 "AGR" 16190.268 "ARG" 1960 "CON" 6326.399 "ARG" 1970 "CON" 7773.84 "ARG" 1980 "CON" 7460.041 "ARG" 1990 "CON" 4453.29 "ARG" 2000 "CON" 9094.761 "ARG" 2010 "CON" 8459.559 "ARG" 1960 "FIRE" 10378.604 "ARG" 1970 "FIRE" 10840.906 "ARG" 1980 "FIRE" 11463.33 "ARG" 1990 "FIRE" 6980.222 "ARG" 2000 "FIRE" 8623.354 "ARG" 2010 "FIRE" 7328.641 "ARG" 1960 "GOV" 9412.982 "ARG" 1970 "GOV" 9608.455 "ARG" 1980 "GOV" 8566.728 "ARG" 1990 "GOV" 6305.592 "ARG" 2000 "GOV" 6279.64 "ARG" 2010 "GOV" 6142.36 "ARG" 1960 "MAN" 7614.975 "ARG" 1970 "MAN" 12927.145 "ARG" 1980 "MAN" 15444.467 "ARG" 1990 "MAN" 12530.603 "ARG" 2000 "MAN" 21147.12 "ARG" 2010 "MAN" 25071.666 "ARG" 1960 "MIN" 31663.04 "ARG" 1970 "MIN" 68859.62 "ARG" 1980 "MIN" 110079.85 "ARG" 1990 "MIN" 119446.76 "ARG" 2000 "MIN" 230808.84 "ARG" 2010 "MIN" 90408.21 "ARG" 1960 "OTH" 5753.756 "ARG" 1970 "OTH" 5606.121 "ARG" 1980 "OTH" 4998.317 "ARG" 1990 "OTH" 3679.042 "ARG" 2000 "OTH" 4011.429 "ARG" 2010 "OTH" 4534.363 "ARG" 1960 "PU" 2297.5989 "ARG" 1970 "PU" 4385.5186 "ARG" 1980 "PU" 8996.652 "ARG" 1990 "PU" 12170.942 "ARG" 2000 "PU" 20137.03 "ARG" 2010 "PU" 28556.434 "ARG" 1960 "SUM" 7292.438 "ARG" 1970 "SUM" 9459.183 "ARG" 1980 "SUM" 10741.543 "ARG" 1990 "SUM" 7988.315 "ARG" 2000 "SUM" 10429.977 "ARG" 2010 "SUM" 11703.62 "ARG" 1960 "TRA" 5709.911 "ARG" 1970 "TRA" 8175.761 "ARG" 1980 "TRA" 12398.574 "ARG" 1990 "TRA" 10746.12 "ARG" 2000 "TRA" 13155.982 "ARG" 2010 "TRA" 24833.934 "ARG" 1960 "WRT" 10518.568 "ARG" 1970 "WRT" 9730.58 "ARG" 1980 "WRT" 11062.238 "ARG" 1990 "WRT" 6516.053 "ARG" 2000 "WRT" 8259.874 "ARG" 2010 "WRT" 9496.094 "BFA" 1970 "AGR" 110.32106 "BFA" 1980 "AGR" 230.1052 "BFA" 1990 "AGR" 224.48415 "BFA" 2000 "AGR" 376.9785 "BFA" 2010 "AGR" 603.76544 "BFA" 1970 "CON" 14784.226 "BFA" 1980 "CON" 18590.33 "BFA" 1990 "CON" 8609.532 "BFA" 2000 "CON" 8166.037 "BFA" 2010 "CON" 3140.118 "BFA" 1970 "FIRE" 98228.82 "BFA" 1980 "FIRE" 121360.67 "BFA" 1990 "FIRE" 146959.22 "BFA" 2000 "FIRE" 62266.25 "BFA" 2010 "FIRE" 22497 "BFA" 1970 "GOV" 1235.855 "BFA" 1980 "GOV" 4920.595 "BFA" 1990 "GOV" 6849.526 "BFA" 2000 "GOV" 6538.629 "BFA" 2010 "GOV" 6756.323 "BFA" 1970 "MAN" 1026.6361 "BFA" 1980 "MAN" 2069.4717 "BFA" 1990 "MAN" 2499.018 "BFA" 2000 "MAN" 3014.091 "BFA" 2010 "MAN" 1275.7748 "BFA" 1970 "MIN" 4535.848 "BFA" 1980 "MIN" 14251.697 "BFA" 1990 "MIN" 5578.705 "BFA" 2000 "MIN" 1658.1753 "BFA" 2010 "MIN" 2099.5117 "BFA" 1970 "OTH" 860.5823 "BFA" 1980 "OTH" 1124.9858 "BFA" 1990 "OTH" 2475.863 "BFA" 2000 "OTH" 1739.577 end
Code:
** Estimate CAGR and base productivity ** gen cagr = (lp/L10.lp)^(1/10)-1 label var cagr "10-year CAGR of labour productivity" gen base_lp = L10.lp replace base_lp=ln(base_lp) label var base_lp "Log initial value added per worker" drop if missing(cagr) gen decade=10*floor(year/10) gen dd=(year/10-floor(year/10)==0)
Code:
** baseline specification with interaction base productivity and decade dummies-without country fixed effects eststo: reg cagr i.decade##c.base_lp if sector=="SUM" & dd==1, vce(cluster country) margins decade, dydx(base_lp) marginsplot, yline(0) saving(marginsplotU_expanded10S_tot, replace) title(Average marginal effect of aggregate initial labour productivity) testparm i.decade#c.base_lp
Code:
Linear regression Number of obs = 219 F(11, 46) = 5.66 Prob > F = 0.0000 R-squared = 0.1331 Root MSE = .02455 (Std. Err. adjusted for 47 clusters in country) ---------------------------------------------------------------------------------- | Robust cagr | Coef. Std. Err. t P>|t| [95% Conf. Interval] -----------------+---------------------------------------------------------------- decade | 1970 | -.0369443 .0508452 -0.73 0.471 -.1392904 .0654018 1980 | -.0325573 .0537875 -0.61 0.548 -.1408259 .0757113 1990 | -.0669999 .0462792 -1.45 0.154 -.160155 .0261553 2000 | -.0176603 .048822 -0.36 0.719 -.1159338 .0806133 2010 | .0279238 .0462706 0.60 0.549 -.065214 .1210617 | base_lp | -.0029204 .0047142 -0.62 0.539 -.0124096 .0065689 | decade#c.base_lp | 1970 | .0045283 .0054172 0.84 0.408 -.006376 .0154326 1980 | .0026011 .0056971 0.46 0.650 -.0088666 .0140688 1990 | .0050658 .0049548 1.02 0.312 -.0049076 .0150393 2000 | .0009163 .0051466 0.18 0.859 -.0094434 .0112759 2010 | -.0041625 .0048945 -0.85 0.399 -.0140146 .0056895 | _cons | .0561863 .0449996 1.25 0.218 -.0343932 .1467657 ---------------------------------------------------------------------------------- (est1 stored) . margins decade, dydx(base_lp) Average marginal effects Number of obs = 219 Model VCE : Robust Expression : Linear prediction, predict() dy/dx w.r.t. : base_lp ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- base_lp | decade | 1960 | -.0029204 .0047142 -0.62 0.539 -.0124096 .0065689 1970 | .0016079 .0023384 0.69 0.495 -.0030991 .006315 1980 | -.0003193 .0030564 -0.10 0.917 -.0064715 .0058329 1990 | .0021455 .0020347 1.05 0.297 -.0019502 .0062412 2000 | -.0020041 .0022425 -0.89 0.376 -.006518 .0025099 2010 | -.0070829 .0018853 -3.76 0.000 -.0108778 -.003288 ------------------------------------------------------------------------------
My first question is: what is the reason why one should be careful in Stata with interpreting the coefficients of a regression which contains interaction terms between the explanatory variable and (decade) dummies? I tried to find an explanation for this but I have not been succesful in this so far.
My second question is: how could it be that my marginsplot shows a significant effect for labour productivity in decade=2010, but the coefficient for this interaction term (decade#c.base_lp) in the regression is insignificant?
If anyone could help me with this, it would be much appreciated. I understand my questions relate more to theory and the understanding of Stata, hopefully these questions are allowed.
I thank you for your time.
Best,
Satya
0 Response to Question about interpreting coefficients of regression with interaction terms
Post a Comment