STATA Mini Course Fall 2015 Jane Leber Herr Littauer 113 1Stata Mini Course – Spring 2015.

Slides:



Advertisements
Similar presentations
Document Properties: adding information to your Microsoft Office documents Step 1: Add information to Document Properties What are Document Properties.
Advertisements

Do files, log files, and workflow in Stata Biostatistics 212 Lecture 2.
Generating new variables and manipulating data with STATA Biostatistics 212 Lecture 3.
CourseWhere Guide for Instructors. To view, print and update Attendance and Grades Log on to CourseWhere using your ID and password Link to CourseWhere:
Calendar Browser is a groupware used for booking all kinds of resources within an organization. Calendar Browser is installed on a file server and in a.
Introduction to Statistical Computing in Clinical Research Biostatistics 212 Course director: Mark Pletcher Teaching Assistant: Lee Zane.
Stata Introduction Sociology 229A, Class 2 Copyright © 2008 by Evan Schofer Do not copy or distribute without permission.
Getting Started with your data
The DV Website and YOU! /
Introduction to SPSS (For SPSS Version 16.0)
The basics of the Online Portal
CIS—100 Chapter 13--Outlook 1. Using Your Mail to Take Action 2 Outlooks allows you to take several actions to organize, categorize, and respond to your.
L1: INTRODUCTION Getting started with Stata Angela Ambroz May 2015.
L2: BECOMING SELF- SUFFICIENT IN STATA Getting started with Stata Angela Ambroz May 2015.
Microsoft Windows LEARNING HOW USE AN OPERATING SYSTEM 1.
CS105 Lab 1 – Introduction Section: ??? TA: ??? ??? Announcements CITES Accounts Compass Netfiles Other Administrative Information CS105 Fall
 First time student activates their google account, they need to go to an internet browser and go to  drive.google.com/a/students.macon.k12.nc.usdrive.google.com/a/students.macon.k12.nc.us.
REVISED 2/07 TH MLXchange SEARCH SETTINGS AND FLASHES Log on to MLXchange and select Search from the tabs along the top. The default search page will.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
Project organisation in Stata Adrian Spoerri and Marcel Zwahlen Department of Social and Preventive Medicine University of Berne, Switzerland Research.
Office Tips and Tricks Lisa Short Technology Specialist Summer 2013.
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
E-Manual Training Guide Electronic Manuals, called E-Manuals are easy to use and much easier to keep current than their paper counterparts. This presentation.
Harvard-MIT Data Center (HMDC)
CS 122 Engineering Computation Lab Lab 2 Dan De Sousa and Tim Cheeseman Department of Computer Science Drexel University April 2009 ©By the author. All.
Introduction to Canvas K-5
File Management Presented to The Glades Computer Club January 4, 2001.
Organizing a project, making a table Biostatistics 212 Lecture 7.
Organizing a project, making a table Biostatistics 212 Session 5.
Go to your school’s web locker site school name.schoolweblockers.com) Your user name is the first letter of your first name, the first 4.
U:/msu/course/cse/103 Day 06, Slide 1 CSE students: Do not log in yet. Review Day 6 in your textbook. Think about.
Organizing a project, making a table Biostatistics 212 Lecture 7.
Introduction to Statistical Computing in Clinical Research Biostatistics 212.
CS 123 Engineering Computation Lab Lab 2 Dan De Sousa and Bruce Char Department of Computer Science Drexel University April 2009 ©By the author. All rights.
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
CourseWhere Guide for Instructors. To View, Print and Update Attendance and Grades Log on to CourseWhere using your ID and password Link to CourseWhere:
O FFICE M ANAGEMENT T OOL - II B BA -V I TH. Abdus Salam2 Week-7 Introduction to Query Introduction to Query Querying from Multiple Tables Querying from.
Introduction to Statistical Computing in Clinical Research
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
CFM S4 Cloud iQ Guide THE FUTURE OF CASH AUTOMATION.
STATA for S-052 M. Shane Tutwiler Your Friendly S-040 Lecturer William Johnston IT Services Harvard Graduate School of Education.
Microsoft Outlook 2010 Instructor: Julie Thorngren
Basics of Biostatistics for Health Research Session 1 – February 7 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.
Office Management Tool - II Institute of Management Sciences Muhammad Shahzad Ali Lec 8: Introduction to MS - PROJECT L E C T U R E 8 INTRODUCTION TO MS.
1 Class 1 Lecture Topic Concepts, Definitions and Examples.
Step One: Introduction. Welcome to Follow My Clients! Once you log in, on the home page is your dash board. Here you will find your quick access buttons.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
LOGIN PAGE Login Page Support CRM:
Stata Review Session Economics 1018 Abby Williamson and Hongyi Li November 17, 2006.
Managing Your Computer Staff Development Day January 14, 2008 Presenter: Jenny Wallskog.
MAKING FRIENDS WITH CANVAS AND WRITERS HELP An Introduction to what’ is possible.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
1 1.Log in to the computer in front of you –Temp account: 210class / 2.Update your in Cascadia's system –If I need to you I'll use.
Use of a Peer Notetaker Accommodation If you receive “Use of a Peer Notetaker” as an accommodation this tutorial will show you how to implement that accommodation.
TOOLS TO HELP US COMMUNICATE MORE EFFECTIVELY TOGETHER.
June 17, 2009 Office 2007 Tips & Tricks.
Getting started with Stata
QM222 Class 13 Section D1 Omitted variable bias (Chapter 13.)
Using a set-up file to read ASCII data into SPSS
Excel in M.E. –Using add-ins
ECONOMETRICS ii – spring 2018
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
Introduction Introduction to Stata 2016.
Introduction to Stata Spring 2017.
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
Stata Basic Course Lab 2.
How does my workspace work?
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
CSCE 206 Lab Structured Programming in C
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
Presentation transcript:

STATA Mini Course Fall 2015 Jane Leber Herr Littauer 113 1Stata Mini Course – Spring 2015

Goal: Make you comfortable with Stata 1)Can’t teach you all of Stata 2)But can teach you basics AND 3)Teach you how to teach yourself Stata 2 The Stata Mini-Course Stata Mini Course – Spring 2015

Why is Stata so AWESOME? Let me count the ways… 1)In Excel, you can’t produce a step-by-step record. In Stata,.do files do exactly that! Why is that important? Can remind yourself what you did (and why) Can tweak one thing, and rerun – Ta Da! Can easily find bugs in your code 3 Why use Stata?? Stata Mini Course – Spring 2015

Why is Stata so AWESOME? Let me count the ways… 1)In Excel, you can’t produce a step-by-step record In Stata,.do files do exactly that! 2)Excel is MUCH slower at manipulating data 3)Stata produces much nicer graphs 4)Excel can’t handle econometrics the way Stata can! How much data manipulation ok in Excel? NONE! 4 Why Stata?? Stata Mini Course – Spring 2015

1)Stata mini-course lectures & problem sets Class Dates: Tuesday 2/24 Tuesday 3/10 Tuesday 3/31 Problem Set Dates: Friday 2/20 Friday 3/6 Friday 3/27 Friday 4/10 5 Stata Course Structure Stata Mini Course – Spring 2015

2)Stata office hours (see isite) 6 Stata Course Structure Stata Mini Course – Spring 2015

3)Help by We will try to respond to s ASAP, but goal: Within 24 hours during the week By Monday if over the weekend Google your question! etiquette: If you both of us, do it in a way that we can tell (then we can cc: each other/not duplicate effort) If you figure out the answer on your own, let us know! 7 Stata Course Structure Stata Mini Course – Spring 2015

Resources available on the isite: Class schedule and pset due dates Announcements (e.g., OH switches) Our contact info OH schedule (appointment sign up) Lecture materials Problem Sets Other AWESOME resources 8 Stata iSite Stata Mini Course – Spring 2015

Download from HUIT (see details in PSet #1) Keyserver Client (IMPORTANT!) Stata (tips on how to figure out which version you need) Harvard VPN Help? HUIT Science Center Computer lab 9 Downloading Stata Stata Mini Course – Spring 2015

Stata Windows: Command line Results panel Variables List of commands you’ve run so far 10 What is Stata? Stata Mini Course – Spring 2015

Most awesome part of Stata! – File that holds all the commands you want Stata to run – Can be a file that: Builds your dataset & variables Runs all your regressions Builds your results tables Builds your figures Or any combination! – You will build a.do file for each Stata pset 11.do files! Stata Mini Course – Spring 2015

Where is the.do file? –.do file button – Window: “do file editor” 12.do file example Stata Mini Course – Spring 2015

Saving the results in a.log file – log using example.log … log close – For Stata psets, will send your instructor: your.do file the.log file it creates that holds all the results 13.log file Stata Mini Course – Spring 2015

1)Comment at top (e.g., purpose of the.do file) Comments: * /* */ 2)Save the.do file:.do files do NOT autosave – SAVE FREQUENTLY! 14 Let’s build a.do file… Stata Mini Course – Spring 2015

3)Change the working directory (folder): Easiest if working in the directory where the data live Current directory shown at bottom left Short-cut Tip #1: – Change directory in “File/Change Working Directory” – Can now see path name in Results window – Copy that line of code into the.do file you are building 15 Let’s build a.do file… Stata Mini Course – Spring 2015

4)Start a.log file log using Stata_Lect1.log 16 Let’s build a.do file… Stata Mini Course – Spring 2015

Aside: How tell Stata run command from.do file?? 1)Choose File/“do”: Will run the WHOLE.do file 2)Choose “execute” button from.do file: If nothing highlighted: will run whole.do file If lines highlighted: will run JUST those lines 3)Highlight (partial) line: If PC: control D If mac: control shift D 17 Let’s build a.do file… Stata Mini Course – Spring 2015

5)Open a dataset use StataClass_Raw 6)Let’s look at the data! browse 18 Let’s build a.do file… Stata Mini Course – Spring 2015

5)Open a dataset use StataClass_Raw 6)Let’s look at the data! browse describe summarize 19 Let’s build a.do file… Stata Mini Course – Spring 2015

Figuring out how a command works: Link to even MORE help! Command syntax: summarize [varlist], …options List of options Descriptions EXAMPLES! If don’t know command name: – “search blah” – Google it! 20 Stata help files Stata Mini Course – Spring 2015

5)Open a dataset use StataClass_Raw 6)Let’s look at the data! browse describe summarize summarize uhrswork, detail 21 Let’s build a.do file… Stata Mini Course – Spring 2015

5)Open a dataset use StataClass_Raw 6)Let’s look at the data! browse describe summarize summarize uhrswork, detail tabulate nchild if age>=20 & age<=30 tabulate nchild, nolabel 22 Let’s build a.do file… Stata Mini Course – Spring 2015

7)Build variable “female”: tab sex generate female = 1 if sex==“female” tab sex, nolabel generate female = 1 if sex==2 browse the data (browse sex female) notice “missing values” for the men (no values for them if “tab female”) replace female = 0 if sex==1 (redo “tab female”) 23 Lets build a variable! Stata Mini Course – Spring 2015

8)Cut data down to size: Drop the men Keep if age>=30 & age<=40 9)Save updated dataset: Do NOT call by same name as before! save StataClass_Lect1 Rerun from the start… 24 Saving Data Stata Mini Course – Spring 2015

10) Explore hours worked by # of kids: sum uhrswork if nchild==0 sum uhrswork if nchild>0 bysort nchild: sum uhrswork 11)Close the.log file Rerun from the start… 25 Exploring Hrs Worked by #Kids Stata Mini Course – Spring 2015

ASIDE: Capitalization matters! Commands: Summarize ≠summarize Variable names: Age ≠age 26 Useful things to know… Stata Mini Course – Spring 2015

Useful things you learn: 1)Other ways to build variables (e.g., using tabulate) 2)Labeling variables 3)Other useful commands 4)Lots of other tips that will be invaluable for doing the psets 27 Other things shown in the “clean”.do file: Stata Mini Course – Spring 2015