stataintro - Introduction to STATA1 Lets open STATA. There...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to STATA 1 Let’s open STATA. There are four windows in STATA 1. STATA Command Window – type commands 2. STATA Results Window – output is displayed 3. Review Window – tracks all commands in the current STATA session 4. Variables Window – list all variables in the working data set To view your working directory, type pwd on the command line. To view files in the directory, type dir Suppose you want to view files that satisfy a certain criteria. You may use asterisks. For example dir *.dta dir *.d* dir econ.* To change working directories (e.g. to change to the c:\newdir directory), type cd c:\newdir STATA file types: .dta STATA data set .do STATA do file 1 The outline of this presentation and these notes rely heavily on the excellent course material of Denise Duffy and Dan Levy. (IPR/JCPR’s Introduction to Statistical Software, June 24, 2002)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Reading Data Sets To read in the STATA data set (the extension is .dta), type use stataintro If the data set isn’t in the current directory, type use g:\data\stataintro You can either save a STATA data set as a new file, or overwrite the existing file. To save the data set at a new file, type: save newfile save g:\data\newfile To overwrite the existing file, you must use the replace option: save oldfile, replace STATA can handle one data set at a time in memory. If you want to read a new data set, you need to tell STATA to clear the data set in its memory, type: clear
Background image of page 2
Analyzing a Data Set From the previous exercise, we have read in a data set. Let’s suppose we want to see what are the contents of the
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

stataintro - Introduction to STATA1 Lets open STATA. There...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online