1 / 18

Panel Data Analysis in STATA Binam Ghimire

Panel Data Analysis in STATA Binam Ghimire. 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. Importing Data from Excel into Stata :Theory.

tab
Télécharger la présentation

Panel Data Analysis in STATA Binam Ghimire

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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

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

  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)

  5. Importing Data from Excel into Stata1. 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 debtrafirmszprtabtytgiblitymbv • Note here we have followed (Rajan and Zingles 1995, page 1452)

  6. Importing Data from Excel into Stata2. Pooled estimate • Now run the pooled regression estimates using the regress command: . regress debtrafirmszprtabtytgiblitymbv Note here we have followed (Rajan and Zingles 1995, equation, p. 1452,)

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

  8. Importing Data from Excel into Stata: Fixed Effect Estimate • The command for the fixed effect is : . xtregdebtrafirmszprtabtytgiblitymbv, fe

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

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

  11. Importing Data from Excel into Stata4. Random Test • The command is • xtregdebtrafirmszprtabtytgiblitymbv, re

  12. Importing Data from Excel into Stata4. Random Test

  13. Importing Data from Excel into Stata4. Storing • Again store is • . estimates store random

  14. What should I use: Fixed Effects or Random Effects? • A HausmanTest Approach • In a simple equation yit = xitb + ai + uitHausman(1978) suggested a test to check whether the individual effects (ai) are correlated with the regressors (Xit): • 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

  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.

  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

  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.

  18. Thank You

More Related