{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

STATA_short list 3 28 2011

# STATA_short list 3 28 2011 - STATA A short list of commands...

This preview shows pages 1–5. Sign up to view the full content.

STATA A short list of commands and procedures March 28, 2011 James B. McDonald Department of Economics Brigham Young University 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Table of Contents 1. Entering data 2. Running commands 3. Basic mathematical and statistical operations 4. Basic regression 5. Violations of the regression assumptions 6. Basic testing procedures 7. Some important variations of regression models 8. Qualitative response models 9. ARCH/GARCH models 10. ARIMA models 11. Panel data models 12. Vector autoregressive models (reduced form and structural forms) 13. Nonlinear least squares 14. Maximum likelihood estimation 15. Bootstrapping 16. Matrix operations 2
STATA: a short list of commands and procedures Tutorials: The MIT introduction to STATA written by Aimee Chin is located at http://mit.edu/14.33/www/stata_A.html UCLA has some excellent instructional material, including “movies” which can be reached at http://www.ats.ucla.edu/stat/stata/ FHSS has an online tutorial which can be accessed at http://fhssrsc.byu.edu Stata examples for Wooldridge problems: http://fmwww.bc.edu/gstat/examples/wooldridge/wooldridge.html 1. Entering data \$ Entering data from an asci or text file (w/o a line defining variable names) \$ infile y x1 x2 x3 using c:\data\filename and extension \$ Stata “file”, import, unformatted, ASC, or browse variable names \$ Save as .dta file. \$ Entering data where the first line contains the variable names \$ insheet using c:\data\filename and extension \$ EXCEL data \$ Save the data file as a comma delimited file, filename.csv \$ insheet using c:\data\filename.csv \$ Copy and Paste \$ Copy the data from an Excel spreadsheet \$ Open the Data Editor in Stata either by typing “edit” in the command prompt or clicking on the Data Editor toolbar button \$ Paste the data \$ Close/exit the editor \$ Directly entering data \$ Type “edit” in the command prompt \$ Enter the data \$ Under the “file” command type “save as” and save as a “.dta” file. \$ Close/edit the editor \$ Go to “file” drop menu (upper left corner) and select desired option (example “import”) 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2. Running Commands \$ Running commands from the command window \$ Type a command (such as “edit”, “help”, or “reg y x”) and press enter \$ Running commands from a do-file \$ Open the do-file editor by typing “doedit” in the command prompt or clicking the do-file editor in windows button toolbar button \$ Type the commands you wish to execute \$ Comment lines using an asterisk (*) at the beginning \$ Comment a block of code using (/*) at the beginning and (*/) at the end \$ To wrap-around a long line of code to the next line, type (///) at the end \$ Save the do-file \$ Run the do-file by clicking the “Do current file” toolbar button in the do-file editor (picture of text with a downward pointing arrow) \$ Example of do-file: *Example do-file clear /* clears any previously loaded data*/ insheet using C:\example.csv /*loads a dataset called “example” */ reg Y X, robust /* regresses Y on X using robust standard error */ 3. Basic mathematical and statistical operations \$ Typing “ mata ” in the command window turns STATA into a calculator mode. Typing
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 38

STATA_short list 3 28 2011 - STATA A short list of commands...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online