Loading Libraries
library(foreign)
library(stargazer)
library(plm)
library(pglm)
Loading Data
io.poi <- read.csv("E:/INGO/data/merge.2.csv")
Model 1
io.fit.poi.1 <- glm(iofound ~ iofound.t2 + iofound.total,
family="poisson",data=io.poi)
summary(io.fit.poi.1)
##
## Call:
## glm(formula = iofound ~ iofound.t2 + iofound.total, family = "poisson",
## data = io.poi)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -22.4126 -1.3760 -1.0956 -0.5377 14.8151
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -5.439e-01 1.306e-02 -41.66 <2e-16 ***
## iofound.t2 4.145e-02 1.539e-04 269.27 <2e-16 ***
## iofound.total 2.223e-03 3.225e-05 68.93 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 105595 on 15470 degrees of freedom
## Residual deviance: 52605 on 15468 degrees of freedom
## AIC: 65137
##
## Number of Fisher Scoring iterations: 6
Model 2
io.fit.poi.2 <- glm(iofound ~ iofound.t2 + iofound.total
+ log(tpop) + cinc + polity2 + gdp.mix + trade + war,
family="poisson",data=io.poi)
summary(io.fit.poi.2)
##
## Call:
## glm(formula = iofound ~ iofound.t2 + iofound.total + log(tpop) +
## cinc + polity2 + gdp.mix + trade + war, family = "poisson",
## data = io.poi)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -10.6870 -0.9760 -0.6335 -0.0290 11.3858
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.747e+00 6.667e-02 -71.193 < 2e-16 ***
## iofound.t2 3.794e-02 5.316e-04 71.363 < 2e-16 ***
## iofound.total 9.565e-04 4.602e-05 20.786 < 2e-16 ***
## log(tpop) 4.244e-01 7.133e-03 59.508 < 2e-16 ***
## cinc -2.259e+01 7.519e-01 -30.048 < 2e-16 ***
## polity2 9.599e-02 1.845e-03 52.016 < 2e-16 ***
## gdp.mix 3.592e-05 8.149e-07 44.085 < 2e-16 ***
## trade 1.402e-04 4.005e-06 34.996 < 2e-16 ***
## war -1.796e-01 3.612e-02 -4.974 6.56e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 62097 on 10926 degrees of freedom
## Residual deviance: 17739 on 10918 degrees of freedom
## (4544 observations deleted due to missingness)
## AIC: 28492
##
## Number of Fisher Scoring iterations: 6
Model 3
io.poi.panel <- plm.data(io.poi, index = c("ccode", "year"))
io.fit.poi.panel <- pglm(iofound ~ log(tpop) + cinc + polity2 + gdp.mix + trade + war
+ igosum + abs(e_cen_w_3)
+ iofound.t2 + iofound.total,
data=io.poi.panel, family="poisson",
model = "random", effect=("individual"),
index = c("ccode","year"))
summary(io.fit.poi.panel)
## --------------------------------------------
## Maximum Likelihood estimation
## Newton-Raphson maximisation, 6 iterations
## Return code 2: successive function values within tolerance limit
## Log-Likelihood: -10504.06
## 12 free parameters
## Estimates:
## Estimate Std. error t value Pr(> t)
## (Intercept) -6.742e+00 3.442e-01 -19.590 < 2e-16 ***
## log(tpop) 5.403e-01 4.047e-02 13.349 < 2e-16 ***
## cinc -6.606e+00 1.014e+00 -6.515 7.27e-11 ***
## polity2 1.363e-02 2.827e-03 4.823 1.41e-06 ***
## gdp.mix 8.157e-06 2.731e-06 2.987 0.00282 **
## trade 2.021e-05 6.330e-06 3.193 0.00141 **
## war -9.802e-02 3.643e-02 -2.691 0.00713 **
## igosum 1.293e-02 9.323e-04 13.871 < 2e-16 ***
## abs(e_cen_w_3) 3.612e+00 2.203e-01 16.393 < 2e-16 ***
## iofound.t2 6.245e-03 1.004e-03 6.220 4.96e-10 ***
## iofound.total 1.808e-03 7.346e-05 24.616 < 2e-16 ***
## sigma 7.121e-01 8.171e-02 8.715 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## --------------------------------------------