Analyze the data set "Produc" in "plm" package
Pooled Affect Model
pool<-plm(log(pcap)~log(hwy) + log(water) + log(util) + log(pc) + log(gsp) + log(emp) + log(unemp), data=Produc, model=("pooling"), index = c("state", "year"))
Fixed Affect Model
fixed<-plm(log(pcap)~log(hwy) + log(water) + log(util) + log(pc) + log(gsp) + log(emp) + log(unemp), data=Produc, model=("within"), index = c("state", "year"))
Random Affect Model
random<-plm(log(pcap)~log(hwy) + log(water) + log(util) + log(pc) + log(gsp) + log(emp) + log(unemp), data=Produc, model=("random"), index = c("state", "year"))
pFtest
We cannot reject null hypothesis, so fixed is better
plmtest
We cannot reject null hypothesis, so pool is better
phtest
We should null hypothesis, so fixed is better
So by consolidating all the results, fixed affect model is better for "Produc" data
Pooled Affect Model
pool<-plm(log(pcap)~log(hwy) + log(water) + log(util) + log(pc) + log(gsp) + log(emp) + log(unemp), data=Produc, model=("pooling"), index = c("state", "year"))
Fixed Affect Model
fixed<-plm(log(pcap)~log(hwy) + log(water) + log(util) + log(pc) + log(gsp) + log(emp) + log(unemp), data=Produc, model=("within"), index = c("state", "year"))
Random Affect Model
random<-plm(log(pcap)~log(hwy) + log(water) + log(util) + log(pc) + log(gsp) + log(emp) + log(unemp), data=Produc, model=("random"), index = c("state", "year"))
pFtest
We cannot reject null hypothesis, so fixed is better
plmtest
We cannot reject null hypothesis, so pool is better
phtest
We should null hypothesis, so fixed is better
So by consolidating all the results, fixed affect model is better for "Produc" data
No comments:
Post a Comment