3.14 PRIMJER 9
- Nastavno na prethodni primjer s 12 zemalja (\(N=12\)) i 5 godina (\(T=5\)) pomoću naredbe
plm()
procijenite panel model sa slučajnim efektima uzimajući u obzir iste varijable te ga imenujte kaomodel4
. Pomoću naredbestargazer()
prikažite rezultate združenog panel modelamodel1
, panel modela s fiksnim efektimamodel3
i panel modela sa sluačajnim efektimamodel4
u jednoj tablici.
=plm(zivot~siromastvo+zdravstvo,data=panelpodaci,index=c("zemlja","godina"),
model4model="random",effect="individual")
stargazer(model1,model3,model4,type="text",column.labels=c("Pooled","Fixed","Random"),
intercept.top=TRUE,intercept.bottom=FALSE,model.numbers=FALSE,digits=3,df=FALSE)
##
## ==========================================
## Dependent variable:
## -----------------------------
## zivot
## Pooled Fixed Random
## ------------------------------------------
## Constant 78.011*** 79.475***
## (0.626) (0.763)
##
## siromastvo -0.298*** -0.252*** -0.291***
## (0.090) (0.069) (0.068)
##
## zdravstvo 0.001*** -0.0001 0.0003
## (0.0002) (0.0002) (0.0002)
##
## ------------------------------------------
## Observations 60 60 60
## R2 0.662 0.228 0.283
## Adjusted R2 0.650 0.010 0.258
## F Statistic 55.879*** 6.791*** 22.532***
## ==========================================
## Note: *p<0.1; **p<0.05; ***p<0.01
Koji je model prikladniji?
Provedite Hausmanov test na osnovu FE i RE panel modela pomoću naredbe
phtest()
Provedite Breusch-Paganov test na osnovu RE panel modela
model4
pomoću naredbeplmtest()
Provedite Breusch-Godfreyev test na osnovu RE panel modela
model4
pomoću naredbepbgtest()
Ponovite F-testa na osnovu FE panel modela
model3
i združenog modelamodel1
pomoću naredbepFtest()
phtest(model3,model4)
plmtest(model4,effect="individual",type="bp")
pbgtest(model4)
pFtest(model3,model1)
##
## Hausman Test
##
## data: zivot ~ siromastvo + zdravstvo
## chisq = 8.3383, df = 2, p-value = 0.01547
## alternative hypothesis: one model is inconsistent
##
## Lagrange Multiplier Test - (Breusch-Pagan) for balanced panels
##
## data: zivot ~ siromastvo + zdravstvo
## chisq = 104.32, df = 1, p-value < 2.2e-16
## alternative hypothesis: significant effects
##
## Breusch-Godfrey/Wooldridge test for serial correlation in panel models
##
## data: zivot ~ siromastvo + zdravstvo
## chisq = 9.4836, df = 5, p-value = 0.09126
## alternative hypothesis: serial correlation in idiosyncratic errors
##
## F test for individual effects
##
## data: zivot ~ siromastvo + zdravstvo
## F = 103.38, df1 = 11, df2 = 46, p-value < 2.2e-16
## alternative hypothesis: significant effects
- Nulte se hipoteze svih testova odbacuju osim nulte hipoteze Breusch-Godfreyjeva testa na razini signifikantnosti \(5\%\). Što zaključujete?