1 / 11

Econometrics (NA3011)

Econometrics (NA3011). Reza Mortazavi 2014 Stata Lecture 1. Stata. There is a short introduction to Stata document on the course webpage on Fronter . It is very brief and intends to get you started and not to be comprehensive.

ravi
Download Presentation

Econometrics (NA3011)

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. Econometrics (NA3011) Reza Mortazavi 2014 Stata Lecture 1

  2. Stata • There is a short introduction to Stata document on the course webpage on Fronter. It is very brief and intends to get you started and not to be comprehensive. • You can download the data files that we are going to practice from http://users.du.se/~rem/ or from course webpage (see the map Data sets).

  3. Getting started with Stata • Start the software • You can make a working directory and change to it to save your work. For example in my case: • mkdir"C:\mystata“ • cd "C:\mystata" • Open a log file: log using session1.log • (note *.log makes it editable in other programs such as Notepad)

  4. Getting started with Stata • Open a Stata data file say: wages1.dta • From Menu Select File > Open... • (You may also type use filename in the command window. Note that this would work if the file is located in the current working directory otherwise you need to give the complete path of the file.) • In the following we are going to run commands: • use http://users.du.se/~rem/wages1.dta

  5. Getting familiar with your data • browse • Data browsing window • Rows are cases and columns are variables • Cells with a “.” are missing values. • inspect • A quick way to gain familiarity with the data

  6. Descriptive statistics • summarize wage exper school • summarize wage exeper,detail • hist wage You can shorten commands in Stata. For example sum age • tabulate male

  7. Regression by OLS • correlate wage male • regr wage male • regrwage male experschool

  8. The estimated model • Parameter estimates • Statistical significance • Overall fit of the model • Testing: • test exper=0 • test exper=school=male=0 • test (exper +school=1) (male=exper) • This test is only an example and has no real meaning here. • We could also write: test _b[exper]=0

  9. Predicted values and residuals • predict yhat, xb • predict ehat, residuals • twoway (scatterehatyhat)

  10. Multicollinearity • regr wage male exper school • estatvif

  11. Closing the log file • log close • view session.log • log using session.log, append

More Related