Data analysis using Stata , AMSE Master (M1), Spring semester

Size: px
Start display at page:

Download "Data analysis using Stata , AMSE Master (M1), Spring semester"

Transcription

1 Data analysis using Stata , AMSE Master (M1), Spring semester Notes Marc Sangnier

2 Data analysis using Stata Virtually infinite number of tasks for data analysis. Almost infinite number of commands in Stata (including user-written ones). Objectives of this course 1. Grasping Stata main features and learning how to use it. 2. Learning how to conduct empirical analysis (organization, etc.).

3 Outline of the course Introducing Stata. Using Stata! Tasks oriented sessions (mini-projects and exercises); 2 or 3-student Stata project.

4 Grading Exercices and mini-projects (30%). To be delivered by the end of each session. Stata project (70%) Groups of 2 or 3 (randomly constructed). Session time to work on the project and instructor s help. To be delivered 1 week after the last session. Detailed instructions will be provided in due time.

5 Introduction Overview of Stata. Stata s main commands (and principles). Organizing empirical work.

6 Overview of Stata Strengths of Stata: Very good balance between user-friendlyness and programing flexibility Many pre-programmed features Infinitely extensible Large users community Cross-platform compatibility Few cross-version compatibility issues Let us explore Stata.

7 Stata resources 1. Many online tutorials (including some in French): ta/home.aspx o-antoine/fr/documents/stata.pdf

8 Stata resources 2. Stata official documentation 3. Stata community Statalist: just google «Stata ANYTHING»!

9 Stata s main commands Stata default file format:.dta use use "D:\...\Cours\ AMU Data Analysis using Stata\Files\Lecture 1\census2.dta" use insheet for delimited format data infile, infix for undelimited data

10 Stata s main commands browse or bro or br help describe Variables types list generate and replace summarize tabulate

11 Stata s main commands rename drop keep Lists: wildcard * From var1 to var5 : var1-var5 (order matters) egen

12 Stata s main commands Label values and variables label var text label define labelname rules label values var labelname recode as a command or as a function encode egen functions collapse

13 Stata s main commands Loops forvalues i = foreach x in foreach var of varlist

14 Organizing empirical work Rules and good practices to ensure easy replicability. When going back to your work; When adapting the analysis to other data; When checking someone elses s work.

15 Directories structure ".../My_project" Report (or Paper) Empirics (or Data Analysis) Data Source Temp(orary) Final Programs (or Do-files) Out(put)

16 Do-files and relative paths Programs (or Do-files) Numbered programs (order matters) Including a master file (e.g. 0_master.do) Change directory: cd Relative paths: Down " / " ; Up ".. " The master file allows to run the complete analysis and describe other programs.

17 The "source" folder Original files exactly as obtained, received or downloaded (change of name is allowed). Subfolders allowed if necessary Each file must me accompanied by a name_of_the_file_readme.txt (or name_of_the_file_notes.txt) that specifies all information about the origin of the file (provider, date, etc.). The "source" folder is a read-only directory!

18 Datasets manipulation save (, replace), outsheet clear merge append reshape Temp(orary), Source and Final folders! Basic data checks: duplicates, distinct

19 Do-files Typical "0_master.do" clear [set more off] cd ".../My_project" do "Programs/1_data_preparation.do" * Program that prepares data. do "Programs/2_data_analysis.do" * Program that analyzes data.

20 Do-files Typical "#_anything.do" clear * Data preparation ********************* * Step1 ******** command * comment of the command

21 Problem 1 Problem 2

22 Time series functionalities tsset timevar tsset panelvar timevar L.var F.var D.var L5.var Example: webuse invest2

23 Graphics [graph] twoway Other types of graphs: see help graph Example: sysuse auto scatter length weight

24 Graphics twoway scatter length weight /// lfit length weight /// qfit length weight graph export "Out/graphname.png" Stata graph examples hexamples/

25 Graphics Graphics must contain all relevant information. Labels, legend, axis titles, etc. Graphics are an important way to convey messages and require lots of work. See An Economist s Guide to Visualizing Data, Journal of Economic Perspectives, V.28(1), pp , 2014 (link)

26 Statistical tests Virtually infinite number of statistical tests Either stand-alone tests : Student t-test: ttest Or tests from regressions estimates Need to look for the commands that implement the test you are interested in.

27 Problem 3

28 Saved information and outputs Macros (numeric or string) Local macros cease to exist when the do-file terminates. local a = 2 local b = 3 di `a * `b di "`a and `b " Global macros cease to exist when the current Stata session terminates global pathtemp "/Data/Temp" di "$pathtemp " save "$pathtemp/mydata", replace

29 Saved information and outputs Also possible to use scalars and matrices. Stata commands: e-class and r-class (e for estimation commands and r for other commands) sysuse auto, clear summ price return list

30 Saved information and outputs reg price length ereturn list matrix list e(b) di _b[length]

31 Problem 4 Problem 5 (optional)

32 Exporting output Many different Stata commands depending on exact task outreg2 esttab, estout tabout Many are user-written commands (use Google, findit, ssc install).

33 Final project Freely available data French Government Open Data Penn World Tables Resources for Economists on the Internet FRED Economic Data World Bank Open Data

Empirical trade analysis

Empirical trade analysis Empirical trade analysis Introduction to Stata Cosimo Beverelli World Trade Organization Cosimo Beverelli Stata introduction Bangkok, 18-21 Dec 2017 1 / 23 Outline 1 Resources 2 How Stata looks like 3

More information

Subject index. ASCII data, reading comma-separated fixed column multiple lines per observation

Subject index. ASCII data, reading comma-separated fixed column multiple lines per observation Subject index Symbols %fmt... 106 110 * abbreviation character... 374 377 * comment indicator...346 + combining strings... 124 125 - abbreviation character... 374 377.,.a,.b,...,.z missing values.. 130

More information

Workshop for empirical trade analysis. December 2015 Bangkok, Thailand

Workshop for empirical trade analysis. December 2015 Bangkok, Thailand Workshop for empirical trade analysis December 2015 Bangkok, Thailand Cosimo Beverelli (WTO) Rainer Lanz (WTO) Content a. Resources b. Stata windows c. Organization of the Bangkok_Dec_2015\Stata folder

More information

Introduction to Stata - Session 1

Introduction to Stata - Session 1 Introduction to Stata - Session 1 Simon, Hong based on Andrea Papini ECON 3150/4150, UiO January 15, 2018 1 / 33 Preparation Before we start Sit in teams of two Download the file auto.dta from the course

More information

Ninth ARTNeT Capacity Building Workshop for Trade Research "Trade Flows and Trade Policy Analysis"

Ninth ARTNeT Capacity Building Workshop for Trade Research Trade Flows and Trade Policy Analysis Ninth ARTNeT Capacity Building Workshop for Trade Research "Trade Flows and Trade Policy Analysis" June 2013 Bangkok, Thailand Cosimo Beverelli and Rainer Lanz (World Trade Organization) 1 Introduction

More information

Research Support. Processing Results in Stata

Research Support. Processing Results in Stata Most Stata functions (such as reg) display their results in the Stata results window. Sometimes this is not quite sufficient: we might want to either preserve some of the output and use it in future computations,

More information

Intro to Stata. University of Virginia Library data.library.virginia.edu. September 16, 2014

Intro to Stata. University of Virginia Library data.library.virginia.edu. September 16, 2014 to 1/12 Intro to University of Virginia Library data.library.virginia.edu September 16, 2014 Getting to Know to 2/12 Strengths Available A full-featured statistical programming language For Windows, Mac

More information

Revision of Stata basics in STATA 11:

Revision of Stata basics in STATA 11: Revision of Stata basics in STATA 11: April, 2016 Dr. Selim Raihan Executive Director, SANEM Professor, Department of Economics, University of Dhaka Contents a) Resources b) Stata 11 Interface c) Datasets

More information

A Short Introduction to STATA

A Short Introduction to STATA A Short Introduction to STATA 1) Introduction: This session serves to link everyone from theoretical equations to tangible results under the amazing promise of Stata! Stata is a statistical package that

More information

STATA Tutorial. Elena Capatina Office hours: Mondays 10am-12, SS5017

STATA Tutorial. Elena Capatina Office hours: Mondays 10am-12, SS5017 STATA Tutorial Elena Capatina elena.statahelp@gmail.com Office hours: Mondays 10am-12, SS5017 Stata 10: How to get it Buy from Stata website, pick up at Robarts: http://www.stata.com/order/new/edu/gradplans/cgpcampusorder.html

More information

Week 1: Introduction to Stata

Week 1: Introduction to Stata Week 1: Introduction to Stata Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ALL RIGHTS RESERVED 1 Outline Log

More information

Intermediate Stata. Jeremy Craig Green. 1 March /29/2011 1

Intermediate Stata. Jeremy Craig Green. 1 March /29/2011 1 Intermediate Stata Jeremy Craig Green 1 March 2011 3/29/2011 1 Advantages of Stata Ubiquitous in economics and political science Gaining popularity in health sciences Large library of add-on modules Version

More information

A quick introduction to STATA:

A quick introduction to STATA: 1 Revised September 2008 A quick introduction to STATA: (by E. Bernhardsen, with additions by H. Goldstein) 1. How to access STATA from the pc s at the computer lab After having logged in you have to log

More information

Introduction to Stata. Getting Started. This is the simple command syntax in Stata and more conditions can be added as shown in the examples.

Introduction to Stata. Getting Started. This is the simple command syntax in Stata and more conditions can be added as shown in the examples. Getting Started Command Syntax command varlist, option This is the simple command syntax in Stata and more conditions can be added as shown in the examples. Preamble mkdir tutorial /* to create a new directory,

More information

Thanks to Petia Petrova and Vince Wiggins for their comments on this draft.

Thanks to Petia Petrova and Vince Wiggins for their comments on this draft. Intermediate Stata Christopher F Baum Faculty Micro Resource Center Academic Technology Services, Boston College August 2004 baum@bc.edu http://fmwww.bc.edu/gstat/docs/statainter.pdf Thanks to Petia Petrova

More information

Basic Stata Tutorial

Basic Stata Tutorial Basic Stata Tutorial By Brandon Heck Downloading Stata To obtain Stata, select your country of residence and click Go. Then, assuming you are a student, click New Educational then click Students. The capacity

More information

A quick introduction to STATA:

A quick introduction to STATA: 1 HG Revised September 2011 A quick introduction to STATA: (by E. Bernhardsen, with additions by H. Goldstein) 1. How to access STATA from the pc s at the computer lab and elsewhere at UiO. At the computer

More information

Why should you become a Stata programmer?

Why should you become a Stata programmer? Why should you become a Stata programmer? Christopher F Baum Boston College and DIW Berlin January 2009 Christopher F Baum (BC & DIW Berlin) Why become a Stata programmer? 1 / 52 Introduction Should you

More information

Advanced Stata Skills

Advanced Stata Skills Advanced Stata Skills Contents Stata output in Excel & Word... 2 Copy as Table... 2 putexcel... 2 tabout (v3)... 2 estout / esttab... 2 Common Options... 2 Nice Looking Tables in Stata... 3 Descriptive

More information

An Introduction To Stata and Matlab. Liugang Sheng ECN 240A UC Davis

An Introduction To Stata and Matlab. Liugang Sheng ECN 240A UC Davis An Introduction To Stata and Matlab Liugang Sheng ECN 240A UC Davis Stata and Matlab in our Lab Go to the admin webpage http://admin.econ.ucdavis.edu/computing/ Follow the instruction http://admin.econ.ucdavis.edu/computing/ts_windows/t

More information

Stata Session 2. Tarjei Havnes. University of Oslo. Statistics Norway. ECON 4136, UiO, 2012

Stata Session 2. Tarjei Havnes. University of Oslo. Statistics Norway. ECON 4136, UiO, 2012 Stata Session 2 Tarjei Havnes 1 ESOP and Department of Economics University of Oslo 2 Research department Statistics Norway ECON 4136, UiO, 2012 Tarjei Havnes (University of Oslo) Stata Session 2 ECON

More information

Introduction to Stata Session 3

Introduction to Stata Session 3 Introduction to Stata Session 3 Tarjei Havnes 1 ESOP and Department of Economics University of Oslo 2 Research department Statistics Norway ECON 3150/4150, UiO, 2015 Before we start 1. In your folder statacourse:

More information

Intro to Stata for Political Scientists

Intro to Stata for Political Scientists Intro to Stata for Political Scientists Andrew S. Rosenberg Junior PRISM Fellow Department of Political Science Workshop Description This is an Introduction to Stata I will assume little/no prior knowledge

More information

STATA TUTORIAL B. Rabin with modifications by T. Marsh

STATA TUTORIAL B. Rabin with modifications by T. Marsh STATA TUTORIAL B. Rabin with modifications by T. Marsh 5.2.05 (content also from http://www.ats.ucla.edu/stat/spss/faq/compare_packages.htm) Why choose Stata? Stata has a wide array of pre-defined statistical

More information

Data Management 2. 1 Introduction. 2 Do-files. 2.1 Ado-files and Do-files

Data Management 2. 1 Introduction. 2 Do-files. 2.1 Ado-files and Do-files University of California, Santa Cruz Department of Economics ECON 294A (Fall 2014)- Stata Lab Instructor: Manuel Barron 1 Data Management 2 1 Introduction Today we are going to introduce the use of do-files,

More information

Sacha Kapoor - Masters Metrics

Sacha Kapoor - Masters Metrics Sacha Kapoor - Masters Metrics 091610 1 Address: Max Gluskin House, 150 St.George, Rm 329 Email: sacha.kapoor@utoronto.ca Web: http://individual.utoronto.ca/sacha$_$kapoor 1 Basics Here are some data resources

More information

A quick introduction to STATA

A quick introduction to STATA A quick introduction to STATA Data files and other resources for the course book Introduction to Econometrics by Stock and Watson is available on: http://wps.aw.com/aw_stock_ie_3/178/45691/11696965.cw/index.html

More information

ECO375 Tutorial 1 Introduction to Stata

ECO375 Tutorial 1 Introduction to Stata ECO375 Tutorial 1 Introduction to Stata Matt Tudball University of Toronto Mississauga September 14, 2017 Matt Tudball (University of Toronto) ECO375H5 September 14, 2017 1 / 25 What Is Stata? Stata is

More information

A Short Guide to Stata 10 for Windows

A Short Guide to Stata 10 for Windows A Short Guide to Stata 10 for Windows 1. Introduction 2 2. The Stata Environment 2 3. Where to get help 2 4. Opening and Saving Data 3 5. Importing Data 4 6. Data Manipulation 5 7. Descriptive Statistics

More information

Dr. Barbara Morgan Quantitative Methods

Dr. Barbara Morgan Quantitative Methods Dr. Barbara Morgan Quantitative Methods 195.650 Basic Stata This is a brief guide to using the most basic operations in Stata. Stata also has an on-line tutorial. At the initial prompt type tutorial. In

More information

5. Exercise 5 Produce publication-quality tables of summary statistics and regression results

5. Exercise 5 Produce publication-quality tables of summary statistics and regression results Center for Digital Scholarship Hesburgh Libraries University of Notre Dame James Ng james.ng@nd.edu Using Stata for Data Work Workshop Page: http://www3.nd.edu/~jng2/workshop Agenda 0. Preliminaries 1.

More information

An Introduction to Stata Part II: Data Analysis

An Introduction to Stata Part II: Data Analysis An Introduction to Stata Part II: Data Analysis Kerry L. Papps 1. Overview Do-files Sorting a dataset Combining datasets Creating a dataset of means or medians etc. Weights Panel data capabilities Dummy

More information

ECON Stata course, 3rd session

ECON Stata course, 3rd session ECON4150 - Stata course, 3rd session Andrea Papini Heavily based on last year s session by Tarjei Havnes February 4, 2016 Stata course, 3rd session February 4, 2016 1 / 19 Before we start 1. Download caschool.dta

More information

Use data on individual respondents from the first 17 waves of the British Household

Use data on individual respondents from the first 17 waves of the British Household Applications of Data Analysis (EC969) Simonetta Longhi and Alita Nandi (ISER) Contact: slonghi and anandi; @essex.ac.uk Week 1 Lecture 2: Data Management Use data on individual respondents from the first

More information

An Introduction to Stata Part I: Data Management

An Introduction to Stata Part I: Data Management An Introduction to Stata Part I: Data Management Kerry L. Papps 1. Overview These two classes aim to give you the necessary skills to get started using Stata for empirical research. The first class will

More information

A Quick Guide to Stata 8 for Windows

A Quick Guide to Stata 8 for Windows Université de Lausanne, HEC Applied Econometrics II Kurt Schmidheiny October 22, 2003 A Quick Guide to Stata 8 for Windows 2 1 Introduction A Quick Guide to Stata 8 for Windows This guide introduces the

More information

Sustainability of Public Policy Lecture 1 Introduc6on STATA. Rossella Iraci Capuccinello

Sustainability of Public Policy Lecture 1 Introduc6on STATA. Rossella Iraci Capuccinello Sustainability of Public Policy Lecture 1 Introduc6on STATA Rossella Iraci Capuccinello Ge=ng started in STATA! Start STATA " Simply click on icon " Stata should look like this: BuDons/menu Review window

More information

Introduction to Stata

Introduction to Stata ntroduction to Stata Miguel Sarzosa Department of Economics University of Maryland Econ626: Empirical Microeconomics, 2012 1 What is Stata useful for? 2 The Famous Black Screen 3 Data nput 4 Commands Syntax

More information

Introduction to Stata - Session 2

Introduction to Stata - Session 2 Introduction to Stata - Session 2 Siv-Elisabeth Skjelbred ECON 3150/4150, UiO January 26, 2016 1 / 29 Before we start Download auto.dta, auto.csv from course home page and save to your stata course folder.

More information

0.1 Stata Program 50 /********-*********-*********-*********-*********-*********-*********/ 31 /* Obtain Data - Populate Source Folder */

0.1 Stata Program 50 /********-*********-*********-*********-*********-*********-*********/ 31 /* Obtain Data - Populate Source Folder */ 0.1 Stata Program 1 capture log close master // suppress error and close any open logs 2 log using RDC3-master, name(master) replace text 3 // program: RDC3-master.do 4 // task: Demonstrate basic Stata

More information

Contents Append Merge Further Exercises... 24

Contents Append Merge Further Exercises... 24 Contents 1 Essentials of the Stata Language 3 1.1 Introduction....................................... 3 1.2 Getting Help...................................... 3 1.2.1 Help.......................................

More information

Community Resource: Egenmore, by command, return lists, and system variables. Beksahn Jang Feb 22 nd, 2016 SOC561

Community Resource: Egenmore, by command, return lists, and system variables. Beksahn Jang Feb 22 nd, 2016 SOC561 Community Resource: Egenmore, by command, return lists, and system variables. Beksahn Jang Feb 22 nd, 2016 SOC561 Egenmore Egenmore is a package in Stata that extends the capabilities of the egen command.

More information

Department of Economics Spring 2016 University of California Economics 154 Professor Martha Olney Stata Lesson Wednesday February 17, 2016

Department of Economics Spring 2016 University of California Economics 154 Professor Martha Olney Stata Lesson Wednesday February 17, 2016 University of Califnia Economics 154 Berkeley Profess Martha Olney Stata Lesson Wednesday February 17, 2016 [1] Where to find the data sets http://www.econ.berkeley.edu/~olney/spring16/econ154 There are

More information

Getting started with Stata 2017: Cheat-sheet

Getting started with Stata 2017: Cheat-sheet Getting started with Stata 2017: Cheat-sheet 4. september 2017 1 Get started Graphical user interface (GUI). Clickable. Simple. Commands. Allows for use of do-le. Easy to keep track. Command window: Write

More information

A Practical Introduction to Stata

A Practical Introduction to Stata A Practical Introduction to Stata Mark E. McGovern Harvard Center for Population and Development Studies Geary Institute and School of Economics, University College Dublin August 2012 Abstract This document

More information

Econ Stata Tutorial I: Reading, Organizing and Describing Data. Sanjaya DeSilva

Econ Stata Tutorial I: Reading, Organizing and Describing Data. Sanjaya DeSilva Econ 329 - Stata Tutorial I: Reading, Organizing and Describing Data Sanjaya DeSilva September 8, 2008 1 Basics When you open Stata, you will see four windows. 1. The Results window list all the commands

More information

INTRODUCTION to. Program in Statistics and Methodology (PRISM) Daniel Blake & Benjamin Jones January 15, 2010

INTRODUCTION to. Program in Statistics and Methodology (PRISM) Daniel Blake & Benjamin Jones January 15, 2010 INTRODUCTION to Program in Statistics and Methodology (PRISM) Daniel Blake & Benjamin Jones January 15, 2010 While we are waiting Everyone who wishes to work along with the presentation should log onto

More information

Lab 2: OLS regression

Lab 2: OLS regression Lab 2: OLS regression Andreas Beger February 2, 2009 1 Overview This lab covers basic OLS regression in Stata, including: multivariate OLS regression reporting coefficients with different confidence intervals

More information

Empirical Research: Getting Started with Stata

Empirical Research: Getting Started with Stata The Australian Economic Review, vol. 50, no. 2, pp. 236 50 For the Student Empirical Research: Getting Started with Stata Daniel Tiong* Abstract This article provides a guide to approaching empirical research

More information

Getting Our Feet Wet with Stata SESSION TWO Fall, 2018

Getting Our Feet Wet with Stata SESSION TWO Fall, 2018 Getting Our Feet Wet with Stata SESSION TWO Fall, 2018 Instructor: Cathy Zimmer 962-0516, cathy_zimmer@unc.edu 1) REMINDER BRING FLASH DRIVES! 2) QUESTIONS ON EXERCISES? 3) WHAT IS Stata SYNTAX? a) A set

More information

GETTING DATA INTO THE PROGRAM

GETTING DATA INTO THE PROGRAM GETTING DATA INTO THE PROGRAM 1. Have a Stata dta dataset. Go to File then Open. OR Type use pathname in the command line. 2. Using a SAS or SPSS dataset. Use Stat Transfer. (Note: do not become dependent

More information

Introduction to Programming in Stata

Introduction to Programming in Stata Introduction to in Stata Laron K. University of Missouri Goals Goals Replicability! Goals Replicability! Simplicity/efficiency Goals Replicability! Simplicity/efficiency Take a peek under the hood! Data

More information

Further processing of estimation results: Basic programming with matrices

Further processing of estimation results: Basic programming with matrices The Stata Journal (2005) 5, Number 1, pp. 83 91 Further processing of estimation results: Basic programming with matrices Ian Watson ACIRRT, University of Sydney i.watson@econ.usyd.edu.au Abstract. Rather

More information

Lab 1: Basics of Stata Short Course on Poverty & Development for Nordic Ph.D. Students University of Copenhagen June 13-23, 2000

Lab 1: Basics of Stata Short Course on Poverty & Development for Nordic Ph.D. Students University of Copenhagen June 13-23, 2000 Lab 1: Basics of Stata Short Course on Poverty & Development for Nordic Ph.D. Students University of Copenhagen June 13-23, 2000 This lab is designed to give you a basic understanding of the tools available

More information

ECONOMICS 351* -- Stata 10 Tutorial 1. Stata 10 Tutorial 1

ECONOMICS 351* -- Stata 10 Tutorial 1. Stata 10 Tutorial 1 TOPIC: Getting Started with Stata Stata 10 Tutorial 1 DATA: auto1.raw and auto1.txt (two text-format data files) TASKS: Stata 10 Tutorial 1 is intended to introduce (or re-introduce) you to some of the

More information

/23/2004 TA : Jiyoon Kim. Recitation Note 1

/23/2004 TA : Jiyoon Kim. Recitation Note 1 Recitation Note 1 This is intended to walk you through using STATA in an Athena environment. The computer room of political science dept. has STATA on PC machines. But, knowing how to use it on Athena

More information

Preparing Data for Analysis in Stata

Preparing Data for Analysis in Stata Preparing Data for Analysis in Stata Before you can analyse your data, you need to get your data into an appropriate format, to enable Stata to work for you. To avoid rubbish results, you need to check

More information

You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables

You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables Jennie Murack You will learn: The structure of the Stata interface How to open files in Stata How to modify variable and value labels How to manipulate variables How to conduct basic descriptive statistics

More information

Introduction to STATA

Introduction to STATA Introduction to STATA Duah Dwomoh, MPhil School of Public Health, University of Ghana, Accra July 2016 International Workshop on Impact Evaluation of Population, Health and Nutrition Programs Learning

More information

Department of Economics Spring 2018 University of California Economics 154 Professor Martha Olney Stata Lesson Thursday February 15, 2018

Department of Economics Spring 2018 University of California Economics 154 Professor Martha Olney Stata Lesson Thursday February 15, 2018 University of California Economics 154 Berkeley Professor Martha Olney Stata Lesson Thursday February 15, 2018 [1] Where to find the data sets http://www.econ.berkeley.edu/~olney/spring18/econ154 There

More information

Data Management Using Stata: A Practical Handbook

Data Management Using Stata: A Practical Handbook Data Management Using Stata: A Practical Handbook MICHAEL N. MITCHELL A Stata Press Publication StataCorp LP College Station, Texas Copyright c 2010 by StataCorp LP All rights reserved. First edition 2010

More information

Saving Time with Prudent Data Management. Basic Principles To Save Time. Introducing Our Data. Yearly Directed Dyads (Multiple Panel Data)

Saving Time with Prudent Data Management. Basic Principles To Save Time. Introducing Our Data. Yearly Directed Dyads (Multiple Panel Data) Saving Time with Prudent Data Management Brandon Bartels & Kevin Sweeney Program In Statistics and Methodology Outline Some Basic Principles Introducing the Data (Dyad-Years) Common Tasks Sorting Generating

More information

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata..

Introduction to Stata First Session. I- Launching and Exiting Stata Launching Stata Exiting Stata.. Introduction to Stata 2016-17 01. First Session I- Launching and Exiting Stata... 1. Launching Stata... 2. Exiting Stata.. II - Toolbar, Menu bar and Windows.. 1. Toolbar Key.. 2. Menu bar Key..... 3.

More information

Introduction to STATA

Introduction to STATA Center for Teaching, Research and Learning Research Support Group American University, Washington, D.C. Hurst Hall 203 rsg@american.edu (202) 885-3862 Introduction to STATA WORKSHOP OBJECTIVE: This workshop

More information

ECONOMICS 452* -- Stata 12 Tutorial 1. Stata 12 Tutorial 1. TOPIC: Getting Started with Stata: An Introduction or Review

ECONOMICS 452* -- Stata 12 Tutorial 1. Stata 12 Tutorial 1. TOPIC: Getting Started with Stata: An Introduction or Review Stata 12 Tutorial 1 TOPIC: Getting Started with Stata: An Introduction or Review DATA: auto1.raw and auto1.txt (two text-format data files) TASKS: Stata 12 Tutorial 1 is intended to introduce you to some

More information

Lecture 4: Programming

Lecture 4: Programming Introduction to Stata- A. chevalier Content of Lecture 4: -looping (while, foreach) -branching (if/else) -Example: the bootstrap - saving results Lecture 4: Programming 1 A] Looping First, make sure you

More information

Programming with Stata

Programming with Stata Programming with Stata IAP Skills Workshops Raymond Kluender and Benjamin Marx January 26, 2016 1 / 34 Thanks Thanks and References Special thanks to Sally Hudson for letting us borrow and build on her

More information

INTRODUCTION TO USING STATA FOR ECONOMETRICS

INTRODUCTION TO USING STATA FOR ECONOMETRICS INTRODUCTION TO USING STATA FOR ECONOMETRICS November 14-18, 2016 Dushanbe, Tajikistan Allen Park and Jarilkasin Ilyasov Purpose of the Course The purpose of the course is to provide an introduction to

More information

Kim Mannemar Sønderskov. Stata. A practical introduction. Hans Reitzels Forlag

Kim Mannemar Sønderskov. Stata. A practical introduction. Hans Reitzels Forlag Stata Kim Mannemar Sønderskov Stata A practical introduction Hans Reitzels Forlag Stata: A practical introduction Edition 1, print run 1 The authors and Hans Reitzel Publishers, 2015 Publishing editor:

More information

A Short Guide to Stata 14

A Short Guide to Stata 14 Short Guides to Microeconometrics Fall 2016 Prof. Dr. Kurt Schmidheiny Universität Basel A Short Guide to Stata 14 1 Introduction 2 2 The Stata Environment 2 3 Where to get help 3 4 Additions to Stata

More information

STATA 13 INTRODUCTION

STATA 13 INTRODUCTION STATA 13 INTRODUCTION Catherine McGowan & Elaine Williamson LONDON SCHOOL OF HYGIENE & TROPICAL MEDICINE DECEMBER 2013 0 CONTENTS INTRODUCTION... 1 Versions of STATA... 1 OPENING STATA... 1 THE STATA

More information

Introduction to data analysis using STATA. Miguel Niño-Zarazúa World Institute for Development Economics Research United Nations University

Introduction to data analysis using STATA. Miguel Niño-Zarazúa World Institute for Development Economics Research United Nations University Introduction to data analysis using STATA Miguel Niño-Zarazúa World Institute for Development Economics Research United Nations University Background STATA is powerful command driven package for statistical

More information

Stata: A Brief Introduction Biostatistics

Stata: A Brief Introduction Biostatistics Stata: A Brief Introduction Biostatistics 140.621 2005-2006 1. Statistical Packages There are many statistical packages (Stata, SPSS, SAS, Splus, etc.) Statistical packages can be used for Analysis Data

More information

GETTING STARTED WITH STATA. Sébastien Fontenay ECON - IRES

GETTING STARTED WITH STATA. Sébastien Fontenay ECON - IRES GETTING STARTED WITH STATA Sébastien Fontenay ECON - IRES THE SOFTWARE Software developed in 1985 by StataCorp Functionalities Data management Statistical analysis Graphics Using Stata at UCL Computer

More information

NMU EduCat Course Settings

NMU EduCat Course Settings Course Settings Overview Course settings are used to change the format and number of boxes in the center column of your course in EduCat. These boxes are referred to as sections. They are used to organize

More information

StatLab Workshops 2008

StatLab Workshops 2008 Stata Workshop Fall 2008 Adrian de la Garza and Nancy Hite Using STATA at the Statlab 1. The Different Windows in STATA Automatically displayed windows o Command Window: executes STATA commands; type in

More information

Introduction to Stata. Written by Yi-Chi Chen

Introduction to Stata. Written by Yi-Chi Chen Introduction to Stata Written by Yi-Chi Chen Center for Social Science Computation & Research 145 Savery Hall University of Washington Seattle, WA 98195 U.S.A (206)543-8110 September 2002 http://julius.csscr.washington.edu/pdf/stata.pdf

More information

texdoc 2.0 An update on creating LaTeX documents from within Stata Ben Jann University of Bern,

texdoc 2.0 An update on creating LaTeX documents from within Stata Ben Jann University of Bern, texdoc 2.0 An update on creating LaTeX documents from within Stata Ben Jann University of Bern, ben.jann@soz.unibe.ch 2016 German Stata Users Group Meeting GESIS, Cologne, June 10, 2016 Ben Jann (University

More information

An Introduction to Stata Exercise 1

An Introduction to Stata Exercise 1 An Introduction to Stata Exercise 1 Anna Folke Larsen, September 2016 1 Table of Contents 1 Introduction... 1 2 Initial options... 3 3 Reading a data set from a spreadsheet... 5 4 Descriptive statistics...

More information

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC

Introduction to SAS. Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC Introduction to SAS Cristina Murray-Krezan Research Assistant Professor of Internal Medicine Biostatistician, CTSC cmurray-krezan@salud.unm.edu 20 August 2018 What is SAS? Statistical Analysis System,

More information

Cross-Sectional Analysis

Cross-Sectional Analysis STATA 13 - SAMPLE SESSION Cross-Sectional Analysis Short Course Training Materials Designing Policy Relevant Research and Data Processing and Analysis with STATA 13 for Windows* 1st Edition Margaret Beaver

More information

ADePT: Labor. Technical User s Guide. Version 1.0. Automated analysis of the labor market conditions in low- and middle-income countries

ADePT: Labor. Technical User s Guide. Version 1.0. Automated analysis of the labor market conditions in low- and middle-income countries Development Research Group, Development Economics, World Bank ADePT: Labor Version 1.0 Automated analysis of the labor market conditions in low- and middle-income countries Technical User s Guide The ADePT

More information

Stata Training. AGRODEP Technical Note 08. April Manuel Barron and Pia Basurto

Stata Training. AGRODEP Technical Note 08. April Manuel Barron and Pia Basurto AGRODEP Technical Note 08 April 2013 Stata Training Manuel Barron and Pia Basurto AGRODEP Technical Notes are designed to document state-of-the-art tools and methods. They are circulated in order to help

More information

Results Based Financing for Health Impact Evaluation Workshop Tunis, Tunisia October Stata 2. Willa Friedman

Results Based Financing for Health Impact Evaluation Workshop Tunis, Tunisia October Stata 2. Willa Friedman Results Based Financing for Health Impact Evaluation Workshop Tunis, Tunisia October 2010 Stata 2 Willa Friedman Outline of Presentation Importing data from other sources IDs Merging and Appending multiple

More information

Week 10: Heteroskedasticity II

Week 10: Heteroskedasticity II Week 10: Heteroskedasticity II Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Dealing with heteroskedasticy

More information

From datasets to resultssets in Stata

From datasets to resultssets in Stata From datasets to resultssets in Stata Roger Newson King s College London, London, UK roger.newson@kcl.ac.uk http://www.kcl-phs.org.uk/rogernewson/ Distributed at the 10th UK Stata Users Group Meeting on

More information

Techdata Solution. SAS Analytics (Clinical/Finance/Banking)

Techdata Solution. SAS Analytics (Clinical/Finance/Banking) +91-9702066624 Techdata Solution Training - Staffing - Consulting Mumbai & Pune SAS Analytics (Clinical/Finance/Banking) What is SAS SAS (pronounced "sass", originally Statistical Analysis System) is an

More information

An Introduction to Stata Programming

An Introduction to Stata Programming An Introduction to Stata Programming Second Edition CHRISTOPHER F. BAUM Department of Economics and School of Social Work Boston College A Stata Press Publication StataCorp LP College Station, Texas Copyright

More information

A QUICK INTRODUCTION TO STATA

A QUICK INTRODUCTION TO STATA A QUICK INTRODUCTION TO STATA This module provides a quick introduction to STATA. After completing this module you will be able to input data, save data, transform data, create basic tables, create basic

More information

Cmpt 101 Lab 1 - Outline

Cmpt 101 Lab 1 - Outline Cmpt 101 Lab 1 - Outline Instructions: Work through this outline completely once directed to by your Lab Instructor and fill in the Lab 1 Worksheet as indicated. Contents PART 1: GETTING STARTED... 2 PART

More information

Can double click the data file and it should open STATA

Can double click the data file and it should open STATA ECO 445: International Trade Professor Jack Rossbach Instructions on Doing Gravity Regressions in STATA Important: If you don t know how to use a command, use the help command in R. For example, type help

More information

Empirical Asset Pricing

Empirical Asset Pricing Department of Mathematics and Statistics, University of Vaasa, Finland Texas A&M University, May June, 2013 As of May 17, 2013 Part I Stata Introduction 1 Stata Introduction Interface Commands Command

More information

The Stata Bible 2.0. Table of Contents. by Dawn L. Teele 1

The Stata Bible 2.0. Table of Contents. by Dawn L. Teele 1 The Stata Bible 2.0 by Dawn L. Teele 1 Welcome to what I hope is a very useful research resource for Stata programmers of all levels. The content of this tutorial has been developed while I was writing

More information

OVERVIEW OF WINDOWS IN STATA

OVERVIEW OF WINDOWS IN STATA OBJECTIVES OF STATA This course is the series of statistical analysis using Stata. It is designed to acquire basic skill on Stata and produce a technical reports in the statistical views. After completion

More information

Birkbeck College Department of Economics, Mathematics and Statistics.

Birkbeck College Department of Economics, Mathematics and Statistics. Birkbeck College Department of Economics, Mathematics and Statistics. Graduate Certificates and Diplomas Economics, Finance, Financial Engineering 2012 Applied Statistics and Econometrics INTRODUCTION

More information

PAM 4280/ECON 3710: The Economics of Risky Health Behaviors Fall 2015 Professor John Cawley TA Christine Coyer. Stata Basics for PAM 4280/ECON 3710

PAM 4280/ECON 3710: The Economics of Risky Health Behaviors Fall 2015 Professor John Cawley TA Christine Coyer. Stata Basics for PAM 4280/ECON 3710 PAM 4280/ECON 3710: The Economics of Risky Health Behaviors Fall 2015 Professor John Cawley TA Christine Coyer Stata Basics for PAM 4280/ECON 3710 I Introduction Stata is one of the most commonly used

More information

CONTENT. 1.0 Introduction Downloading and installing the software Running the software Using the software 7

CONTENT. 1.0 Introduction Downloading and installing the software Running the software Using the software 7 2 CONTENT Page 1.0 Introduction 1 2.0 Downloading and installing the software 2 3.0 Running the software 6 4.0 Using the software 7 5.0 Populating Records for Mathematics 9 6.0 Printing Reports 12 7.0

More information

Lecture 2: Advanced data manipulation

Lecture 2: Advanced data manipulation Introduction to Stata- A. Chevalier Content of Lecture 2: Lecture 2: Advanced data manipulation -creating data -using dates -merging and appending datasets - wide and long -collapse 1 A] Creating data

More information

Using SAS and STATA in Archival Accounting Research

Using SAS and STATA in Archival Accounting Research Using SAS and STATA in Archival Accounting Research Kai Chen Dec 2, 2014 Overview SAS and STATA are most commonly used software in archival accounting research. SAS is harder to learn. STATA is much easier.

More information

EXAMPLE 3: MATCHING DATA FROM RESPONDENTS AT 2 OR MORE WAVES (LONG FORMAT)

EXAMPLE 3: MATCHING DATA FROM RESPONDENTS AT 2 OR MORE WAVES (LONG FORMAT) EXAMPLE 3: MATCHING DATA FROM RESPONDENTS AT 2 OR MORE WAVES (LONG FORMAT) DESCRIPTION: This example shows how to combine the data on respondents from the first two waves of Understanding Society into

More information