Year as a dummy ( 1995 is the omitted year):
Call:
plm(formula = mrateunder5 ~ GDPPPP + factor(Year), data = FinalData,
model = "within", index = "Country")
Unbalanced Panel: n = 47, T = 1-3, N = 69
Residuals:
Min. 1st Qu. Median 3rd Qu. Max.
-11.4818 -1.9533 0.0000 1.9816 11.4818
Coefficients:
Estimate Std. Error t-value Pr(>|t|)
GDPPPP 0.0134389 0.0044836 2.9974 0.00773 **
factor(Year)2000 -15.4565645 6.2679791 -2.4660 0.02394 *
factor(Year)2005 -39.5441044 6.6982650 -5.9036 1.374e-05 ***
factor(Year)2010 -59.1835897 9.9644448 -5.9395 1.276e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Total Sum of Squares: 6722.6
Residual Sum of Squares: 1237.5
R-Squared: 0.81592
Adj. R-Squared: 0.30457
F-statistic: 19.9453 on 4 and 18 DF, p-value: 2.0253e-06
When I include Year and Country as dummy variables, I have the same coefficient value on GDP.
Year as a Fixed Effect:
Call:
plm(formula = mrateunder5 ~ GDPPPP, data = FinalData, model = "within",
index = c("Year", "Country"))
Unbalanced Panel: n = 4, T = 4-28, N = 69
Residuals:
Min. 1st Qu. Median 3rd Qu. Max.
-59.296 -24.494 -6.722 19.180 107.636
Coefficients:
Estimate Std. Error t-value Pr(>|t|)
GDPPPP -0.0251533 0.0030549 -8.2338 1.249e-11 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Total Sum of Squares: 183330
Residual Sum of Squares: 89024
R-Squared: 0.5144
Adj. R-Squared: 0.48405
F-statistic: 67.7951 on 1 and 64 DF, p-value: 1.2488e-1
As you can see, the coefficient estimate on "GDPPPP" is different. The results in the second model are my preferred results (negative coefficient, as higher GDP levels lead to lower mortality rates).
Why do these differ - are they supposed to match?
I think it could be because I have incomplete data (data for some countries for some years is missing - e.g., for Afghanistan I am missing the first two time periods (1995 and 2000) but I have the Afghanistan data for 2005 and 2010).
Does one of my models is drop incomplete data? Which one? Is there a way to make the models match?
dput()
) that someone can copy and paste to get the same result. $\endgroup$