Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Panel Data Analysis in STATA Binam Ghimire. Learning Objectives  Importing file into STATA  Running panel data regression  Run fixed, random effect.

Similar presentations


Presentation on theme: "1 Panel Data Analysis in STATA Binam Ghimire. Learning Objectives  Importing file into STATA  Running panel data regression  Run fixed, random effect."— Presentation transcript:

1 1 Panel Data Analysis in STATA Binam Ghimire

2 Learning Objectives  Importing file into STATA  Running panel data regression  Run fixed, random effect test and use of Hausman to test which (among fixed and random) is better 2

3 Importing Data from Excel into Stata :Theory  Papers used: Rajan and Zingles (1995) and Charles Amo Yartey (20XX) – Capital Structure and the Financing unquoted companies in Africa, Evidence from Ghana  Equation can be found in page 1452, Rajan and Zingles (1995) 3

4 Importing Data from Excel into Stata :Theory  File to practice  Find the file (file: named:EDITED_REGDATA) Note: The name of the countries have been given numbers Compensation (Both panel and time variables need to be numeric from STATA)  To import the data in stata: copy and paste from excel to data editor inside data (Or you can import the file from excel, Check various techniques of importing data into STATA) 4

5 Importing Data from Excel into Stata 1. Inform that your file is a panel data  Now you need to tell STATA that your file is a panel data. For this you need to use the command  Xtset code years  tsset code years, yearly (worked for 8.1 version)  Now run the pooled regression estimates using the regress command: . regress debtra firmsz prtabty tgiblity mbv  Note here we have followed (Rajan and Zingles 1995, page 1452) 5

6 Importing Data from Excel into Stata 2. Pooled estimate  Now run the pooled regression estimates using the regress command:. regress debtra firmsz prtabty tgiblity mbv Note here we have followed (Rajan and Zingles 1995, equation, p. 1452,) 6

7 Importing Data from Excel into Stata 2. Pooled estimate 7

8 Importing Data from Excel into Stata : Fixed Effect Estimate  The command for the fixed effect is :. xtreg debtra firmsz prtabty tgiblity mbv, fe 8

9 Importing Data from Excel into Stata : Fixed Effect Estimate 9

10 Importing Data from Excel into Stata 3. Hausman Test  Store it (we want to test hausman to see which is good)  Command to store is:. estimates store random 10

11 Importing Data from Excel into Stata 4. Random Test  The command is  xtreg debtra firmsz prtabty tgiblity mbv, re 11

12 Importing Data from Excel into Stata 4. Random Test 12

13 Importing Data from Excel into Stata 4. Storing  Again store is . estimates store random 13

14 What should I use: Fixed Effects or Random Effects?  A Hausman Test Approach  In a simple equation y it = x it b + a i + u it Hausman (1978) suggested a test to check whether the individual effects (a i ) are correlated with the regressors (X it ):  Under the Null Hypothesis: Orthogonality, i.e., no correlation between individual effects and explanatory variables. Both random effects and fixed effects estimators are consistent, but the random effects estimator is efficient, while fixed effects is not 14

15 What should I use: Fixed Effects or Random Effects?  Ho hypothesis is that estimates by random effect are not different from those from fixed effects. Therefore they are consistent and random effects estimators should be preferred.  Under the Alternative Hypothesis: Individual effects are correlated with the X's. In this case, random effects estimator is inconsistent, while fixed effects estimator is consistent and efficient.  The H1 hypothesis states that estimates by random effects are different from those of fixed effects. Therefore they are not consistent and the random effect estimators are not appropriate. 15

16 What should I use: Fixed Effects or Random Effects?  After storing the results of fixed and random, the command in STATA is  hausman fixed random 16

17 What should I use: Fixed Effects or Random Effects?  So, based on the test above, we can see that the tests statistic (25.82) is greater than the critical value of a Chi-squared (4df, 5%) = 9.48. Null hypothesis rejected. Fixed effects preferred. 17

18 18 Thank You


Download ppt "1 Panel Data Analysis in STATA Binam Ghimire. Learning Objectives  Importing file into STATA  Running panel data regression  Run fixed, random effect."

Similar presentations


Ads by Google