Friday, 15 March 2013

IT and Business Application lab : Assignment 8

 
 
Assignment 8 : Panel Data Analysis
 
Problem I: Do Panel Data Analysis of "Produc" data analyzing on three types of model :
  1. Pooled affect model
  2. Fixed affect model
  3. Random affect model
Problem II: Determine which model is the best by using functions:
  1. pFtest : Fixed vs Pooled
  2. plmtest : Pooled vs Random
  3. phtest: Random vs Fixed
  4.  
     
Solution:
 
To load the dataCommands:

> data("Produc" , package ="plm")
> head(Produc)  
 
 
Pooled Affects Model
Commands:


> 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"))
> summary(pool)
 
 
 
Fixed Affects ModelCommands:

> 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"))
> summary(fixed)
 
 
Random Affects ModelCommands:

> 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"))
> summary(random)
 
 
 
Tests:
Pooled vs Fixed:

H0: Pooled Affects Model
H1: Fixed Affects Model
 
 
As the p-value is very small, we reject the null hypothesis and accept the alternate hypothesis.
=> Fixed affects model is accepted.

Pooled vs Random:
H0: Pooled Affects Model
H1: Random Affects Model

 
As the p-value is very small, we reject the null hypothesis and accept the alternate hypothesis.
=> Random affects model is accepted.

Random vs Fixed:
H0: Random Affects Model
H1: Fixed Affects Model 
 
 
As the p-value is very small, we reject the null hypothesis and accept the alternate hypothesis.
=> Fixed affects model is accepted.

Conclusion:
By conducting all the above tests, we come to a conclusion that Fixed Affects Model is the best to do the panel data analysis for "Produc".

No comments:

Post a Comment