Introduction_to_STATA - Econometrics Laboratory Department...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 There, you will find a great deal of documentation. Another great resource is 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

This note was uploaded on 10/01/2011 for the course ECON 103 taught by Professor Sandrablack during the Fall '07 term at UCLA.

Page1 / 7

Introduction_to_STATA - Econometrics Laboratory Department...

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

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