Stata Introduction Sociology 229A, Class 2 Copyright © 2008 by Evan Schofer Do not copy or distribute without permission.

Slides:



Advertisements
Similar presentations
Housekeeping: Variable labels, value labels, calculations and recoding
Advertisements

Statistical Methods Lynne Stokes Department of Statistical Science Lecture 7: Introduction to SAS Programming Language.
Stata and logit recap. Topics Introduction to Stata – Files / directories – Stata syntax – Useful commands / functions Logistic regression analysis with.
Stata Intro Practice Exercises Debby Kermer, George Mason University Libraries Data Services.
Teaching Statistics Using Stata Software Susan Hailpern BSN MPH MS Department of Epidemiology and Population Health Albert Einstein College of Medicine.
I NTRO TO S TATA James Ng Center for Digital Scholarship Hesburgh Libraries.
Introduction to SPSS Allen Risley Academic Technology Services, CSUSM
INTRODUCTION TO STATA Võ Tuấn Khoa Trần Thế Trung.
Srinivasulu Rajendran Centre for the Study of Regional Development (CSRD) School of Social Sciences (SSS) Jawaharlal Nehru University (JNU) New Delhi -
Ann Arbor ASA ‘Up and Running’ Series: SPSS Prepared by volunteers of the Ann Arbor Chapter of the American Statistical Association, in cooperation with.
Introduction to Statistical Computing in Clinical Research Biostatistics 212 Course director: Mark Pletcher Teaching Assistant: Lee Zane.
A Simple Guide to Using SPSS© for Windows
Introduction to SPSS (For SPSS Version 16.0)
Good Data Management Practices Patty Glynn 10/31/05
Getting Started with your data
SPSS Statistical Package for the Social Sciences is a statistical analysis and data management software package. SPSS can take data from almost any type.
Introduction to SPSS Short Courses Last created (Feb, 2008) Kentaka Aruga.
Sociology 690 SPSS Introduction. Using SPSS The Statistical Package for the Social Sciences (SPSS) started at Stanford University in the late 1960’s.
Introduction to SPSS (For SPSS Version 16.0)
STATA User Group September 2007 Shuk-Li Man and Hannah Evans.
How to Analyze Data? Aravinda Guntupalli. SPSS windows process Data window Variable view window Output window Chart editor window.
L1: INTRODUCTION Getting started with Stata Angela Ambroz May 2015.
Stata Workshop #1 Chiu-Hsieh (Paul) Hsu Associate Professor College of Public Health
ALEXANDER C. LOPILATO R: Because the names of other stat programs don’t make sense so why should this one?
© Copyright 2000, Julia Hartman 1 Next An Interactive Tutorial for SPSS 10.0 for Windows © by Julia Hartman Using Command Syntax.
Scottish Social Survey Network: Master Class 1 Data Analysis with Stata Dr Vernon Gayle and Dr Paul Lambert 23 rd January 2008, University of Stirling.
1 Experimental Statistics - week 4 Chapter 8: 1-factor ANOVA models Using SAS.
SPSS Presented by Chabalala Chabalala Lebohang Kompi Balone Ndaba.
Harvard-MIT Data Center (HMDC)
Using SPSS for Windows Part II Jie Chen Ph.D. Phone: /6/20151.
Key Data Management Tasks in Stata
Part 4 Syntax or point-and-click?. British Social Attitudes 1986 Q.114, page 43b.
STATA Mini Course Fall 2015 Jane Leber Herr Littauer 113 1Stata Mini Course – Spring 2015.
Social Science Research Design and Statistics, 2/e Alfred P. Rovai, Jason D. Baker, and Michael K. Ponton Splitting Files PowerPoint Prepared by Alfred.
DLI Boot Camp 2011 Finding Statistics: Tools and Techniques Jean Blackburn Vancouver Island University Library SDA.
Being Productive with Stata and VA Data Give me six hours to chop down a tree and I will spend the first four sharpening the axe. --Abraham Lincoln Todd.
Example SPSS Basic Medical Statistics Course October 2010 Wilma Heemsbergen.
Introduction to Statistical Computing in Clinical Research Biostatistics 212.
Advanced Stata Workshop FHSS Research Support Center.
1 An Introduction to SPSS for Windows Jie Chen Ph.D. 6/4/20161.
A Simple Guide to Using SPSS ( Statistical Package for the Social Sciences) for Windows.
Dr. Engr. Sami ur Rahman Research Methods in Computer Science Lecture: Data Analysis (Introduction to SPSS)
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.
Getting Started with Stata 2/11/2010 Tom Tomberlin Nealia Khan Learning Technologies Center Harvard Graduate School of Education.
STATA for S-052 M. Shane Tutwiler Your Friendly S-040 Lecturer William Johnston IT Services Harvard Graduate School of Education.
Basics of Biostatistics for Health Research Session 1 – February 7 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.
Today’s Goals Answer questions about homework and lecture 2 Understand what a query is Understand how to create simple queries using Microsoft Access 2007.
1.Introduction to SPSS By: MHM. Nafas At HARDY ATI For HNDT Agriculture.
PSC 47410: Data Analysis Workshop  What’s the purpose of this exercise?  The workshop’s research questions:  Who supports war in America?  How consistent.
DTC Quantitative Methods Summary of some SPSS commands Weeks 1 & 2, January 2012.
Today Introduction to Stata – Files / directories – Stata syntax – Useful commands / functions Logistic regression analysis with Stata – Estimation – GOF.
Sociology 680 SPSS Introduction. Using SPSS The Statistical Package for the Social Sciences (SPSS) started at Stanford University in the late 1960’s.
1 PEER Session 02/04/15. 2  Multiple good data management software options exist – quantitative (e.g., SPSS), qualitative (e.g, atlas.ti), mixed (e.g.,
Elementary Analysis Richard LeGates URBS 492. Univariate Analysis Distributions –SPSS Command Statistics | Summarize | Frequencies Presents label, total.
Stata Review Session Economics 1018 Abby Williamson and Hongyi Li November 17, 2006.
Topics Introduction to Stata – Files / directories – Stata syntax – Useful commands / functions Logistic regression analysis with Stata – Estimation –
Stata: Getting Starting and Being Productive with VA Data Give me six hours to chop down a tree and I will spend the first four sharpening the axe. --Abraham.
IENG-385 Statistical Methods for Engineers SPSS (Statistical package for social science) LAB # 1 (An Introduction to SPSS)
With the support of the LPP programme of the European Union 1 This project has been funded with support from the European Commission. This publication.
Topics Introduction to Stata – Files / directories – Stata syntax – Useful commands / functions Logistic regression analysis with Stata – Estimation –
An Interactive Tutorial for SPSS 10.0 for Windows©
QM222 Class 13 Section D1 Omitted variable bias (Chapter 13.)
QS101 – Introduction to Quantitative Methods in Social Science Week 2: Introduction to Stata and Preparation of Field Work Florian Reiche Teaching Fellow.
DEPARTMENT OF COMPUTER SCIENCE
ECONOMETRICS ii – spring 2018
Lab 2 Data Manipulation and Descriptive Stats in R
Computing A Variable Mean
Stata Basic Course Lab 4.
Presentation, data and programs at:
A Brief Introduction to Stata(2)
Presentation transcript:

Stata Introduction Sociology 229A, Class 2 Copyright © 2008 by Evan Schofer Do not copy or distribute without permission

Stata Intro Stata is awesome because: It is powerful –It does nearly everything that you’d need –And, it is being improved all the time It is fast It is extensible –People can write “add-ons” that you can download Programming is simpler/cleaner than SPSS or SAS –Though it has its quirks… It is a common standard… datasets are increasingly available in Stata format

Stata Quirks Stata is case sensitive Variable “age” not the same as “AGE” Stata syntax is elegant, but potentially cryptic Math operators are reminiscent of a computer language –They work great, but there is a learning curve Made worse by the fact that you an abbreviate any stata command –“generate” becomes “gen”, “summarize” becomes “sum”

Stata Advice Learn to write programs the old way… What stata calls “do” files –Open up “do file” editor and write commands And, save the commands into a “do file” Run commands by selecting them and clicking “do” Don’t use “point-and-click” menus to do analyses –Why? When doing research, you need a clear record –E.g., of how you coded all variables –Because you may collaborate; or need to review things later You need to be able to easily change your decisions –Re-code variables, etc…

Stata Basics use – open a stata data file use "C:\Users\schofer\Documents\GSS2006subset.dta" generate – compute a new variable gen x=0 gen logGDPPerCapita = ln(GDP/Population) Note: gen will not over-write data This is to prevent errors… Instead, use “replace” replace x=5 replace male = 1 if gender == 2 egen – extensions to “gen” Fancy computations like computing variable means, counts, etc.

Stata Basics If/then commands: Stata is opposite of SPSS SPSS – If x=1 Y=2 Stata: replace y=2 if x==1 Stata is clearer in 2 ways: –By specifying the computation first –By using double-equals (==) to indicate comparison –Single-equals assigns value, double compares… –Note: Stata allows “if” in any context Including in a regression reg salary jobhrs educ, if male == 1 –Conduct an analysis looking only at males –Easier than cumbersome “select” or “filter” in SPSS.

Stata Basics sum – “summarize” = descriptive statistics Mean, SD, etc sum age educ maritalstatus tab – “tabulate” = histogram or crosstab Specify 2 variables to make a crosstab tab educ tab sex maritalstatus reg – “regress” = multivariate regression reg depvar indep1 indep2 indep3 reg salary jobhrs educ

Stata Basics Let’s review a simple do-file together From the homework assignment…