This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Econometrics Laboratory Department of Economics UCLA, Fall 2011 Handout 1 Introduction to STATA I Stata is a very powerful program that is used in a wide variety of academic disciplines. The official website of the software is http://www.stata.com. There, you will find a great deal of documentation. Another great resource is http://www.ats.ucla.edu/STAT/stata. There are many detailed illustrations about how to use the program as well as the underlying theory. This handout will introduce you to the basic steps of using Stata. Topics to be Covered: • Getting Started with Stata • Variables in Stata • Other Useful Knowledge to Know 1. Getting Started with Stata 1.1 The operating display There will be four window once Stata is started: • Command: This is where Stata command are typed • Results: output from commands, and error messages, appear here • Review: A listing of commands recently executed • Variable: Names of variables in data and labels (if created) 1.2 Working Directory You may want to copy the data into a convenient directory. To change the working directory to, say c: \ data \ stata, we need to type 1 cd c: \ data \ stata into the command window and press enter. 1.3 Opening Stata data files There are couple of ways to open and load a Stata data set to the memory. • Click the Open icon on the toolbar • First change your working directory to the location that you have stored the Stata data files. Then type use dataset name. The clear command will clear what is in Stata’s memory. Therefore if you want to open the data file and clear memory, enter the command use dataset name,clear • Apply the use command. For example, if we want to open a data set with the path ”c: \ data \ stata \ cps small.dta”, then we type use ”c: \ data \ stata \ cps small.dta” Furthermore, if we want to clear any existing data from the memory, we type use ”c: \ data \ stata \ cps small.dta”,clear • We can also use the files on the internet. For example, if the Stata data fileWe can also use the files on the internet....
View
Full Document
 Fall '07
 SandraBlack
 Econometrics, Stata data files

Click to edit the document details