1 / 10

STATA

STATA. Introductory manual. QUIZ. What are the main OLS assumptions? On average right Linear Predicting variables and error term uncorrelated No serial correlation in error term Homoscedasticity + Normality of error term. QUIZ. Do we know the error term? Do we know the coefficients?

Télécharger la présentation

STATA

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. STATA Introductory manual

  2. QUIZ • What are the main OLS assumptions? • On average right • Linear • Predicting variables and error term uncorrelated • No serial correlation in error term • Homoscedasticity + Normality of error term

  3. QUIZ • Do we know the error term? • Do we know the coefficients? • How can we know whether all the assumptions are fulfilled • On average right => ??? • Linearity => ??? • X and ε uncorrelated => ??? • ε serially uncorrelated => ??? • ε homoscedastic => ???

  4. STATA as calculator • Multiplication and other simple operations • display (7*(6+5)/4)^(-0.3) • Statistical calculations • display norm(1.96) • Generating variables • gen t=year-1967 • Etc...

  5. STATA for matrices • Writing down matrix • matrix X=(1,4\1,-2\1,3\1,-5) • Reading a matrix (you have to know its name) • matrix list X • Learning what matrices there are • matrix dir • Multiplications • matrix XX=X’*X • matrix IXX=inv(XX) • Etc...

  6. Getting data to STATA • How to get data to STATA? • From Excel [Copy&Paste, remember „commas”] • Manually [if one has the time ... ] • From other sources [import function] • How to know what it is? • Describe [read the texts] • summarize [statistical properties] • Learning more about your data set • correlate x1 y [just to see how it works] • histogram x1 [graphing is easier from the menu] • scatter x1 y [as above ]

  7. Regression with STATA • How to do regression? • regress y x • regress y x, nocons and that’s it 

  8. Diagnostics with STATA • Normality of the residual • predict e, residual [directly after regress] • sktest e [Jarque-Bery test] • RESET test • ovtest, rhs

  9. Diagnostics with STATA • Heteroscedasticity • hettest, rhs [Breush-Pagan test] • imtest, white [White test] • Autocorrelation • tsset t • dwstat [Durbin-Watson test] • bgodfrey, lags(1 2 3) [Breush-Godfrey test]

  10. Diagnostics with STATA • Structural stability [Chow] • gen d=0 • gen dx1=0 • gen dx2=0 • gen dx3=0 • replace d=1 if t>50 • replace dx1=x1 if t>50 • replace dx2=x2 if t>50 • replace dx3=x3 if t>50 • reg y x1 x2 x3 d dx1 dx2 dx3 • test (d=0) (dx1=0) (dx2=0) (dx3=0)

More Related