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

Size: px
Start display at page:

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

Transcription

1 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 Workflow 5 // version: First draft 6 // project: Texas Census Research Data Center Workshop on 7 // project management 8 // author: Nathanael Rosenheim \ Jan clear all // Clear existing data files 11 macro drop _all // Drop macros from memory 12 version 10 // Set Version 13 set more off // Tell Stata to not pause for --more-- messages // What it is the root directory on your computer? 16 * NOTE * Use forward slash (/) - Recognized by all OS 17 * NOTE * MacOSX and Windows require different directory structures 18 local rootdir = "C:/Users/Nathanael/Dropbox/MyProjects" cd " rootdir " // change to project directory 21 * Stata can create folders if they do not exist 22 capture mkdir RDC3 // Project directory 23 cd RDC3 24 capture mkdir Source // Original, unchanged data sources 25 capture mkdir Derived // Constructed from the source data 26 capture mkdir Clean // Data to explore and interpret 27 capture mkdir Tables_Figures // Output Tables and Figures 28 capture mkdir Text // Text to share /********-*********-*********-*********-*********-*********-*********/ 31 /* Obtain Data - Populate Source Folder */ 32 /********-*********-*********-*********-*********-*********-*********/ 33 * US Census Bureau - Texas County Characteristics Datasets: 34 * Annual County Resident Population Estimates by 35 * Age, Sex, Race, and Hispanic Origin: April 1, 2010 to July 1, copy " " /// 37 "Source/POP_CC-EST2013-ALLDATA-48.csv", replace 38 copy " /// 39 "Source/POP_CC-EST2013-ALLDATA-48_Codebook.pdf", replace * Small Area Income and Poverty Estimates 42 * Texas County Estimates for copy " /// 44 "source/saipe_est10all.xls", replace 45 copy " /// 46 "source/saipe_est10all_codebook.txt", replace /********-*********-*********-*********-*********-*********-*********/ 49 /* Scrub Data - Derive Stata Files from Sources */ 50 /********-*********-*********-*********-*********-*********-*********/ 51 /* Common scrubbing tasks 52 - Convert data from one format to another 53 - Filter observations 54 - Extract and replace values 55 - Split, merge, stack, or extract columns */ 56 1

2 57 * Create Population Estimates Stata file from CSV 58 insheet using "Source/POP_CC-EST2013-ALLDATA-48.csv" 59 save "derived/pop_cc-est2013-alldata-48.dta", replace * Create SAIPE Stata file from Excel 62 import excel "Source/SAIPE_est10ALL.xls", clear 63 save "derived/saipe_est10all.dta", replace * Drop and Add Variables Population File Files 66 use "derived/pop_cc-est2013-alldata-48.dta", clear 67 keep if year == 1 // 4/1/2010 Census population 68 keep if agegrp == 0 // Total age groups 69 keep state county tot_pop wa* ba* h_* // Keep white, black Hispanic totals 70 gen tot_wa = wa_male + wa_female // total white alone population 71 gen tot_ba = ba_male + ba_female // total black alone population 72 gen tot_h = h_male + h_female // total Hispanic alone population 73 keep state county tot* // drop sex variables 74 save "derived/pop_2010_tx", replace * Clean SAIPE Excel Files 77 use "derived/saipe_est10all.dta", clear 78 drop E-G K-AE // Do not need variables 79 rename H PALL // Poverty Percent All Ages 80 label variable PALL "Poverty Percent All Ages" 81 * Example of Stata native variables 82 drop if _n <= 3 // Drop first 3 rows 83 keep if A == "48" // Keep Texas 84 destring, replace // Convert Strings to numeric 85 save "derived/saipe_2010_tx", replace * Add Merge ID - FIPS County Pop Data 88 use "derived/pop_2010_tx", clear 89 // generated FIPS_Code from State and County Codes 90 gen str5 FIPS_County = string(state,"%02.0f")+string(county,"%03.0f") 91 sort FIPS_County 92 save "derived/pop_2010_tx_id", replace 93 * Add Merge ID - FIPS County SAIPE Data 94 use "derived/saipe_2010_tx", clear 95 // generated FIPS_Code from State and County Codes 96 gen str5 FIPS_County = string(a,"%02.0f")+string(b,"%03.0f") 97 sort FIPS_County 98 save "derived/saipe_2010_tx_id", replace * Merge SAIPE and SEER Data 101 use "derived/pop_2010_tx_id", clear 102 merge FIPS_County using "derived/saipe_2010_tx_id" 103 save "derived/saipe_pop_2010_tx", replace * Drop uneeded variables and reorder 106 use "derived/saipe_pop_2010_tx", clear 107 drop state county A B _merge 108 order FIPS_County D C 109 save "derived/saipe_pop_2010_tx_fltr", replace * Add pop percent variables, label new variables 112 use "derived/saipe_pop_2010_tx_fltr", clear 113 * EXAMPLE OF LOOP 114 foreach re in wa ba h { // loop through white, black Hispanic 115 gen p_ re = tot_ re / tot_pop * format p_ re %04.2f // 2

3 117 } 118 * Label variables 119 label variable p_wa "Percent White" 120 label variable p_ba "Percent Black" 121 label variable p_h "Percent Hispanic" 122 /* */ 123 /* Clean Data - Final scrub - Save File to Clean Folder */ 124 /* */ 125 save "clean/rdc3-saipe_pop_2010_tx", replace 126 outsheet using /// 127 "clean/rdc3-saipe_pop_2010_tx.csv", comma replace // To use in R /********-*********-*********-*********-*********-*********-*********/ 130 /* Explore Data - Create Tables and Figures to Interpret */ 131 /********-*********-*********-*********-*********-*********-*********/ 132 * ssc install estout, replace // to create tables install estout 133 * Create Table with Descriptive Statistics 134 use "clean/rdc3-saipe_pop_2010_tx", replace 135 local dscrb_vars PALL p_* // Variables to describe 136 capture noisily eststo clear 137 capture noisily estpost tabstat dscrb_vars, /// 138 statistics(min max p50 mean sd count) columns(statistics) 139 capture noisily esttab using /// 140 "tables_figures/rdc3-tables.rtf" /// 141, alignment(r) replace label gaps modelwidth(6) nonumbers /// 142 cells("count(fmt(%4.0f)) min(fmt(%4.2f)) max(fmt(%4.2f)) p50(fmt(%4.2f)) mean(fmt(%4.2f)) sd(fmt(%4.2f))") noobs /// 143 title(basic Descriptive Statistics Poverty and Population Data for Texas Counties 2010) /// 144 addnote(" c(filename) c(current_date) ") 145 eststo clear * Create Histogram of poverty 148 use "clean/rdc3-saipe_pop_2010_tx", replace 149 local graphcaption = "Histogram of Percent Poverty for Texas Counties 2010." 150 histogram PALL, frequency normal kdensity /// 151 title( graphcaption ) /// 152 caption(" c(filename) c(current_date) ", size(tiny)) 153 graph export "tables_figures/histpall.pdf", replace 154 notes: Poverty has a normal distribution 155 save "clean/rdc3-saipe_pop_2010_tx", replace 156 /********-*********-*********-*********-*********-*********-*********/ 157 /* Model Data */ 158 /********-*********-*********-*********-*********-*********-*********/ 159 * Output Regression Table 160 use "clean/rdc3-saipe_pop_2010_tx", replace 161 capture noisily eststo: regress PALL p_* capture noisily esttab using /// 164 "tables_figures/rdc3-tables.rtf" /// 165, b(%4.3f) se(%4.3f) ar2 onecell append label modelwidth(6) nonumbers /// 166 title(parameter Estimates from Models of Poverty with Race and Ethnicity) /// 167 alignment(c) parentheses /// 168 addnote(" c(filename) c(current_date) ") 169 capture noisily eststo clear 170 notes: Race and ethnicity predictors have significant coef. 171 notes: Include median income? Will race still be significant? 172 save "clean/rdc3-saipe_pop_2010_tx", replace 173 /********-*********-*********-*********-*********-*********-*********/ 174 /* Interpret Data */ 3

4 175 /********-*********-*********-*********-*********-*********-*********/ 176 notes // View notes 177 // Example of how Stata stores regression results 178 tempname handel1 179 file open handel1 using "text/rdc3-interpret.rtf", write replace 180 file write handel1 "For Texas in 2010, " 181 file write handel1 "there is a significant association between " 182 file write handel1 "poverty and race." _n 183 file write handel1 "The model had e(n) counties and " _n 184 file write handel1 "an adjusted r-sqaure of e(r2_a). " _n 185 file write handel1 "See notes store in c(filename) " 186 file close handel /********-*********-*********-*********-*********-*********-*********/ 189 /* End Log */ 190 /********-*********-*********-*********-*********-*********-*********/ log close master 193 * Exit Program 194 exit * NOTE * Nothing below "exit" will run or be included in the log file eststo, esttab come from estout 199 For more information on estout see: Making Regression Tables in Stata /********-*********-*********-*********-*********-*********-*********/ 203 /* QUICK STATA REMINDERS */ 204 /********-*********-*********-*********-*********-*********-*********/ 205 Good resources: Programming Stata Stata is case sensitive - for variable names as well as commands. 211 Stata sees a return as then end of a line Create indents with spaces instead of tabs - if possible. 214 Avoid spaces in folder and file names Macros - See help macro 217 /********-*********-*********-*********-*********-*********-*********/ 218 local name = expression 219 name defined by expression 220 Use for numbers, strings, nested macros ie. name = " var i " 221 During execute in the do-file where created local name variable list 224 name contains list of variables * NOTE * Missing equal sign 225 Great for model variables 226 During execute in the do-file where created global same options as local 229 $name or ${name} - when using {} name can be nested ${ var i } 230 Great for project name, filter options 231 During current Stata session, across all do-files STATA If Conditions 234 Operator Meaning 4

5 235 /********-*********-*********-*********/ 236 == equal to 237 > greater than 238 >= greater than or equal to 239 < less than 240 <= less than or equal to\ 241!= or = not equal to 242 & combine operators AND 243 combine operators OR Stata has two built-in variables called _n and _N. 246 _n is Stata notation for the current observation number. 247 _n is 1 in the first observation, 2 in the second, 3 in the third, and so on. 248 _N is Stata notation for the total number of observations Comment types 252 Comments may be added to programs in three ways: 253 o begin the line with *; 254 o begin the comment with //; or 255 o place the comment between /* and */ delimiters /// is one way to make long lines more readable 258 Like the // comment indicator, the /// indicator must be preceded by one or 259 more blanks Additional ways to control Stata 262 set varabbrev off // Turn off variable abbreviations 263 set linesize 80 // Set Line Size - 80 Characters for Readability Stata 12 can not read *.dta files saved in Stata saveold will fix this problem To create a directory use the command capture mkdir /********-*********-*********-*********-*********-*********-*********/ 271 /* Excercises */ 272 /********-*********-*********-*********-*********-*********-*********/ 273 Add Median income and include a second model in the output Make the program more robust to run for different states. 5

6 0.1.1 SAS Program 1 * Turn on SYBMBOLGEN option to see how macro variables are resolved in log; 2 * global system option MPRINT to view the macro code with the 3 macro variables resolved; 4 options SYMBOLGEN MPRINT; 5 /********-*********-*********-*********-*********-*********-*********/ 6 /* Description of Program */ 7 /********-*********-*********-*********-*********-*********-*********/ 8 * program: RDC2-master.SAS 9 * task: Run all do-files associated with project 10 * project: Texas Census Research Data Center Workshop on 11 * project management 12 * author: Nathanael Rosenheim \ Jan *; 13 /* */ 14 /* Important Folder Locations */ 15 /* */ 16 %LET rootdir = C:\Users\Nathanael\Dropbox\MyProjects\RDC3\; 17 * Where is the source data?; 18 %LET dd_data = &rootdir.source\; 19 * Where will the sas7bdat files be saved?; 20 %LET dd_saslib = &rootdir.; 21 /* */ 22 /* Define SAS Library */ 23 /* */ 24 %let library = Derived; 25 LIBNAME &library "&dd_saslib.sas_derived"; /********-*********-*********-*********-*********-*********-*********/ 28 /* Obtain Data */ 29 /********-*********-*********-*********-*********-*********-*********/ 30 * Data downloaded and located in RootDir/Source/; 31 /********-*********-*********-*********-*********-*********-*********/ 32 /* Scrub Data - Derive Stata Files from Sources */ 33 /********-*********-*********-*********-*********-*********-*********/ 34 * Create Population Estimates SAS file from CSV; 35 PROC IMPORT DATAFile = "&dd_data.saipe_est10all.xls" 36 DBMS = XLS OUT = &library..saipe_est10all REPLACE; 37 DATAROW=3; 38 GETNAMES = NO; 39 MIXED = YES; 40 RUN; 41 * Clean SAIPE Excel Files; 42 DATA &library..saipe_2010_all_messy REPLACE; 43 SET &library..saipe_est10all; 44 IF A = "" THEN DELETE; 45 IF B = "" THEN DELETE; 46 stfips = input(a, Best12.); 47 County = input(b,best12.); 48 State = input(c,$char2.); 49 CountyName = input(d,$char20.); 50 Year = 2010; 51 PALL = input(h,comma15.); 52 PALLLB = input(i,comma15.); 53 PALLUB = input(j,comma15.); 54 RUN; 55 * Drop the original variables to create an unsorted or messy temp file; 56 DATA &library..saipe_2010_all REPLACE; 57 SET &library..saipe_2010_all_messy (DROP = A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA AB AC AD AE); 6

7 58 RUN; 59 * Add Merge ID - FIPS County SAIPE Data; 60 DATA &library..saipe_2010_all_id REPLACE; 61 SET &library..saipe_2010_all; 62 If stfips LT 10 Then do; 63 StateFP = "0" PUT(stfips, 1.); 64 If County LT 10 Then 65 FIPS_County = "0" PUT(stfips, 1.) "00" PUT(County, 1.); 66 ELSE If County LT 100 Then 67 FIPS_County = "0" PUT(stfips, 1.) "0" PUT(County, 2.); 68 ELSE If County LT 1000 Then 69 FIPS_County = "0" PUT(stfips, 1.) PUT(County, 3.); 70 End; 71 Else If stfips LT 100 Then do; 72 StateFP = PUT(stfips, 2.); 73 If County LT 10 Then 74 FIPS_County = PUT(stfips, 2.) "00" PUT(County, 1.); 75 ELSE If County LT 100 Then 76 FIPS_County = PUT(stfips, 2.) "0" PUT(County, 2.); 77 ELSE If County LT 1000 Then 78 FIPS_County = PUT(stfips, 2.) PUT(County, 3.); 79 End; 80 RUN; 81 * Add labels; 82 Data &library..saipe_2010_all_labeled; 83 Set &library..saipe_2010_all_id; 84 LABEL 85 StateFP = "State FIPS" 86 FIPS_County = "County FIPS" 87 State = "Postal" 88 CountyName = "Name" 89 PALL = "Estimated percent of people of all ages in poverty" 90 PALLLB = "90% CI LB of estimate of percent of people of all ages in poverty" 91 PALLUB = "90% CI UB of estimate of percent of people of all ages in poverty" 92 run; 93 * Sort Data; 94 DATA &library..saipe_2010_all_labeled REPLACE; 95 Retain 96 FIPS_County 97 Year; 98 SET &library..saipe_2010_all_labeled; 99 RUN; 100 /* */ 101 Clean Data - Final scrub - Save File to Clean Folder */ 102 /* */ 103 %let library = Cleaned; 104 LIBNAME &library "&dd_saslib.sas_clean"; Proc Sort data = Derived.SAIPE_2010_All_labeled 107 out = &library..rdc3_saipe_pop_2010_tx; 108 by FIPS_county year; 109 Run; 7

8 0.1.2 R Program 1 # program: RDC3-master.R 2 # task: Demonstrate basic Stata Workflow 3 # version: First draft 4 # project: Texas Census Research Data Center Workshop on 5 # project management 6 # author: Nathanael Rosenheim \ Jan # What it is the root directory on your computer? 10 setwd("c:/users/nathanael/dropbox/myprojects/rdc3") # *******-*********-*********-*********-*********-*********-*********/ 13 # Obtain Data - */ 14 # *******-*********-*********-*********-*********-*********-*********/ 15 # Data output from Stata RDC3-Master.do file clean <- read.csv("clean/rdc3-saipe_pop_2010_tx.csv", header=true) 18 attach(clean) # *******-*********-*********-*********-*********-*********-*********/ 21 # Model Data */ 22 # *******-*********-*********-*********-*********-*********-*********/ #Figure 6.2 on page m1 <- lm(pall p_wa+p_ba+p_h) 26 summary(m1) detach(clean) 8

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

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

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

Data analysis using Stata , AMSE Master (M1), Spring semester Data analysis using Stata 2016-2017, AMSE Master (M1), Spring semester Notes Marc Sangnier Data analysis using Stata Virtually infinite number of tasks for data analysis. Almost infinite number of commands

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

After opening Stata for the first time: set scheme s1mono, permanently

After opening Stata for the first time: set scheme s1mono, permanently Stata 13 HELP Getting help Type help command (e.g., help regress). If you don't know the command name, type lookup topic (e.g., lookup regression). Email: tech-support@stata.com. Put your Stata serial

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

Census-ACS Master Index Files

Census-ACS Master Index Files Census-ACS Master Index Files Documentation and User s Guide VERSION 1.1 March 1, 2013 Created by Michael J. Greenwald, Ph.D., AICP With assistance from Jonathan Brooks, Texas A&M Transportation Institute

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

Lab #7: Mapping US Census Data

Lab #7: Mapping US Census Data Lab #7: Mapping US Census Data Objectives: Access US Census Data via the Web Download census data in excel format Create new variables based on calculations Create key fields for merging with NYC Planning

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

1 Why use do-files in Stata? 2 Make do-files robust 3 Make do-files legible 4 A sample template for do-files 5 How to debug simple errors in Stata

1 Why use do-files in Stata? 2 Make do-files robust 3 Make do-files legible 4 A sample template for do-files 5 How to debug simple errors in Stata Do files in Stata Contents 1 Why use do-files in Stata? 2 Make do-files robust 3 Make do-files legible 4 A sample template for do-files 5 How to debug simple errors in Stata Why use do-files in Stata?

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

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

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

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200;

3. Almost always use system options options compress =yes nocenter; /* mostly use */ options ps=9999 ls=200; Randy s SAS hints, updated Feb 6, 2014 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, first version: March 8, 2013 ***************; 2. Don

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

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

A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes

A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes A SAS Macro for Producing Benchmarks for Interpreting School Effect Sizes Brian E. Lawton Curriculum Research & Development Group University of Hawaii at Manoa Honolulu, HI December 2012 Copyright 2012

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

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

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

Stat 302 Statistical Software and Its Applications SAS: Data I/O

Stat 302 Statistical Software and Its Applications SAS: Data I/O Stat 302 Statistical Software and Its Applications SAS: Data I/O Yen-Chi Chen Department of Statistics, University of Washington Autumn 2016 1 / 33 Getting Data Files Get the following data sets from the

More information

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

Reading data in SAS and Descriptive Statistics

Reading data in SAS and Descriptive Statistics P8130 Recitation 1: Reading data in SAS and Descriptive Statistics Zilan Chai Sep. 18 th /20 th 2017 Outline Intro to SAS (windows, basic rules) Getting Data into SAS Descriptive Statistics SAS Windows

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

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

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

2. Don t forget semicolons and RUN statements The two most common programming errors.

2. Don t forget semicolons and RUN statements The two most common programming errors. Randy s SAS hints March 7, 2013 1. Always begin your programs with internal documentation. * ***************** * Program =test1, Randy Ellis, March 8, 2013 ***************; 2. Don t forget semicolons and

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

Quick Guide to American FactFinder

Quick Guide to American FactFinder Quick Guide to American FactFinder 1. Search Terms... 2 2. Finding Neighborhoods... 6 3. Downloading the Tables 13 4. Interpreting the Numbers... 18 Introduction The American FactFinder is a useful online

More information

EXAMPLE 10: PART I OFFICIAL GEOGRAPHICAL IDENTIFIERS IN THE UNDERSTANDING SOCIETY PART II LINKING MACRO-LEVEL DATA AT THE LSOA LEVEL

EXAMPLE 10: PART I OFFICIAL GEOGRAPHICAL IDENTIFIERS IN THE UNDERSTANDING SOCIETY PART II LINKING MACRO-LEVEL DATA AT THE LSOA LEVEL EXAMPLE 10: PART I OFFICIAL GEOGRAPHICAL IDENTIFIERS IN THE UNDERSTANDING SOCIETY PART II LINKING MACRO-LEVEL DATA AT THE LSOA LEVEL DESCRIPTION: The objective of this example is to illustrate how external

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

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

Quick Reference for the FloridaCHARTS Fetal Death Query

Quick Reference for the FloridaCHARTS Fetal Death Query Quick Reference for the FloridaCHARTS Fetal Death Query 1. Toolbar Functions 2. Reports 3. Frequently Asked Questions This application is set up in sections. To use it, you do not have to follow any particular

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

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

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

SAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority

SAS 101. Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23. By Tasha Chapman, Oregon Health Authority SAS 101 Based on Learning SAS by Example: A Programmer s Guide Chapter 21, 22, & 23 By Tasha Chapman, Oregon Health Authority Topics covered All the leftovers! Infile options Missover LRECL=/Pad/Truncover

More information

Office 2016 Excel Basics 25 Video/Class Project #37 Excel Basics 25: Power Query (Get & Transform Data) to Convert Bad Data into Proper Data Set

Office 2016 Excel Basics 25 Video/Class Project #37 Excel Basics 25: Power Query (Get & Transform Data) to Convert Bad Data into Proper Data Set Office 2016 Excel Basics 25 Video/Class Project #37 Excel Basics 25: Power Query (Get & Transform Data) to Convert Bad Data into Proper Data Set Goal in video # 25: Learn about how to use the Get & Transform

More information

Moving Data and Results Between SAS and Excel. Harry Droogendyk Stratia Consulting Inc.

Moving Data and Results Between SAS and Excel. Harry Droogendyk Stratia Consulting Inc. Moving Data and Results Between SAS and Excel Harry Droogendyk Stratia Consulting Inc. Introduction SAS can read ( and write ) anything Introduction In the end users want EVERYTHING in. Introduction SAS

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

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

Base and Advance SAS

Base and Advance SAS Base and Advance SAS BASE SAS INTRODUCTION An Overview of the SAS System SAS Tasks Output produced by the SAS System SAS Tools (SAS Program - Data step and Proc step) A sample SAS program Exploring SAS

More information

texdoc 2.0 An update on creating LaTeX documents from within Stata Example 2

texdoc 2.0 An update on creating LaTeX documents from within Stata Example 2 texdoc 20 An update on creating LaTeX documents from within Stata Contents Example 2 Ben Jann University of Bern, benjann@sozunibech 2016 German Stata Users Group Meeting GESIS, Cologne, June 10, 2016

More information

Figure 3.20: Visualize the Titanic Dataset

Figure 3.20: Visualize the Titanic Dataset 80 Chapter 3. Data Mining with Azure Machine Learning Studio Figure 3.20: Visualize the Titanic Dataset 3. After verifying the output, we will cast categorical values to the corresponding columns. To begin,

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

PDQ-Notes. Reynolds Farley. PDQ-Note 3 Displaying Your Results in the Expert Query Window

PDQ-Notes. Reynolds Farley. PDQ-Note 3 Displaying Your Results in the Expert Query Window PDQ-Notes Reynolds Farley PDQ-Note 3 Displaying Your Results in the Expert Query Window PDQ-Note 3 Displaying Your Results in the Expert Query Window Most of your options for configuring your query results

More information

AcaStat User Manual. Version 8.3 for Mac and Windows. Copyright 2014, AcaStat Software. All rights Reserved.

AcaStat User Manual. Version 8.3 for Mac and Windows. Copyright 2014, AcaStat Software. All rights Reserved. AcaStat User Manual Version 8.3 for Mac and Windows Copyright 2014, AcaStat Software. All rights Reserved. http://www.acastat.com Table of Contents INTRODUCTION... 5 GETTING HELP... 5 INSTALLATION... 5

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

Exercise 13. Accessing Census 2000 PUMS Data

Exercise 13. Accessing Census 2000 PUMS Data Exercise 13. Accessing Census 2000 PUMS Data Purpose: The goal of this exercise is to extract some 2000 PUMS data for Asian Indians for PUMAs within California. You may either download the records for

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

Introduction to Stata: An In-class Tutorial

Introduction to Stata: An In-class Tutorial Introduction to Stata: An I. The Basics - Stata is a command-driven statistical software program. In other words, you type in a command, and Stata executes it. You can use the drop-down menus to avoid

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

Lab #3: Probability, Simulations, Distributions:

Lab #3: Probability, Simulations, Distributions: Lab #3: Probability, Simulations, Distributions: A. Objectives: 1. Reading from an external file 2. Create contingency table 3. Simulate a probability distribution 4. The Uniform Distribution Reading from

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

Stata v 12 Illustration. First Session

Stata v 12 Illustration. First Session Launch Stata PC Users Stata v 12 Illustration Mac Users START > ALL PROGRAMS > Stata; or Double click on the Stata icon on your desktop APPLICATIONS > STATA folder > Stata; or Double click on the Stata

More information

Interfacing with MS Office Conference 2017

Interfacing with MS Office Conference 2017 Conference 2017 Session Description: This session will detail procedures for importing/exporting data between AeriesSIS Web Version/AeriesSIS Client Version and other software packages, such as word processing

More information

ImmTrac Texas Immunization Registry Electronic Transfer Standards for Providers

ImmTrac Texas Immunization Registry Electronic Transfer Standards for Providers ImmTrac Texas Immunization Registry Electronic Transfer Standards for Providers Implementation Date: June 2002 Revision Date: February 2013 Texas Department of State Health Services ImmTrac - Immunization

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

A Cross-national Comparison Using Stacked Data

A Cross-national Comparison Using Stacked Data A Cross-national Comparison Using Stacked Data Goal In this exercise, we combine household- and person-level files across countries to run a regression estimating the usual hours of the working-aged civilian

More information

Getting Started Using Stata

Getting Started Using Stata Categorical Data Analysis Getting Started Using Stata Scott Long and Shawna Rohrman cda12 StataGettingStarted 2012 05 11.docx Getting Started in Stata Opening Stata When you open Stata, the screen has

More information

User Guide of UNCTAD Global Database on Creative Economy

User Guide of UNCTAD Global Database on Creative Economy User Guide of UNCTAD Global Database on Creative Economy Introduction to UNCTAD Global Database on Creative Economy This user guide introduces UNCTAD Global Database on Creative Economy and provides basic

More information

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands.

Introduction to SAS. I. Understanding the basics In this section, we introduce a few basic but very helpful commands. 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 SAS Workshop Objective This workshop

More information

Using NHGIS: An Introduction

Using NHGIS: An Introduction Using NHGIS: An Introduction August 2014 Funding provided by the National Science Foundation and National Institutes of Health. Project support provided by the Minnesota Population Center at the University

More information

Using UNIX Shell Scripting to Enhance Your SAS Programming Experience

Using UNIX Shell Scripting to Enhance Your SAS Programming Experience Paper 2412-2018 Using UNIX Shell Scripting to Enhance Your SAS Programming Experience James Curley, Eliassen Group ABSTRACT This series will address three different approaches to using a combination of

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

Appendix II: STATA Preliminary

Appendix II: STATA Preliminary Appendix II: STATA Preliminary STATA is a statistical software package that offers a large number of statistical and econometric estimation procedures. With STATA we can easily manage data and apply standard

More information

Writing Programs in SAS Data I/O in SAS

Writing Programs in SAS Data I/O in SAS Writing Programs in SAS Data I/O in SAS Statistics 135 Autumn 2005 Copyright c 2005 by Mark E. Irwin Writing SAS Programs Your SAS programs can be written in any text editor, though you will often want

More information

Getting Started with the XML Engine

Getting Started with the XML Engine 3 CHAPTER 1 Getting Started with the XML Engine What Does the XML Engine Do? 3 Understanding How the XML Engine Works 3 Assigning a Libref to an XML Document 3 Importing an XML Document 4 Exporting an

More information

Stata version 12. Lab Session 1 February Preliminary: How to Screen Capture.. 2. Preliminary: How to Keep a Log of Your Stata Session..

Stata version 12. Lab Session 1 February Preliminary: How to Screen Capture.. 2. Preliminary: How to Keep a Log of Your Stata Session.. Stata version 12 Lab Session 1 February 2013 1. Preliminary: How to Screen Capture.. 2. Preliminary: How to Keep a Log of Your Stata Session.. 3. Preliminary: How to Save a Stata Graph... 4. Enter Data:

More information

Reference Guide. Adding a Generic File Store - Importing From a Local or Network ShipWorks Page 1 of 21

Reference Guide. Adding a Generic File Store - Importing From a Local or Network ShipWorks Page 1 of 21 Reference Guide Adding a Generic File Store - Importing From a Local or Network Folder Page 1 of 21 Adding a Generic File Store TABLE OF CONTENTS Background First Things First The Process Creating the

More information

Biostatistics & SAS programming. Kevin Zhang

Biostatistics & SAS programming. Kevin Zhang Biostatistics & SAS programming Kevin Zhang January 26, 2017 Biostat 1 Instructor Instructor: Dong Zhang (Kevin) Office: Ben Franklin Hall 227 Phone: 570-389-4556 Email: dzhang(at)bloomu.edu Class web:

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

DSCI 325: Handout 2 Getting Data into SAS Spring 2017

DSCI 325: Handout 2 Getting Data into SAS Spring 2017 DSCI 325: Handout 2 Getting Data into SAS Spring 2017 Data sets come in many different formats. In some situations, data sets are stored on paper (e.g., surveys) and other times data are stored in huge

More information

Introduction to STATA 6.0 ECONOMICS 626

Introduction to STATA 6.0 ECONOMICS 626 Introduction to STATA 6.0 ECONOMICS 626 Bill Evans Fall 2001 This handout gives a very brief introduction to STATA 6.0 on the Economics Department Network. In a few short years, STATA has become one of

More information

An Introduction to STATA ECON 330 Econometrics Prof. Lemke

An Introduction to STATA ECON 330 Econometrics Prof. Lemke An Introduction to STATA ECON 330 Econometrics Prof. Lemke 1. GETTING STARTED A requirement of this class is that you become very comfortable with STATA, a leading statistical software package. You were

More information

Example 1 - Joining datasets by a common variable: Creating a single table using multiple datasets Other features illustrated: Aggregate data multi-variable recode, computational calculation Background:

More information

Steve Graves Forensic Geography Lab: Joining Data from Census to GIS. Background

Steve Graves Forensic Geography Lab: Joining Data from Census to GIS. Background Steve Graves Forensic Geography Lab: Joining Data from Census to GIS Background Now that you have some experience downloading Census Data from the internet, you must now learn to make it appear on a map

More information

Principles of Biostatistics and Data Analysis PHP 2510 Lab2

Principles of Biostatistics and Data Analysis PHP 2510 Lab2 Goals for Lab2: Familiarization with Do-file Editor (two important features: reproducible and analysis) Reviewing commands for summary statistics Visual depiction of data- bar chart and histograms Stata

More information

Chapter 2: Getting Data Into SAS

Chapter 2: Getting Data Into SAS Chapter 2: Getting Data Into SAS Data stored in many different forms/formats. Four categories of ways to read in data. 1. Entering data directly through keyboard 2. Creating SAS data sets from raw data

More information

Chapter 2 Autodesk Asset Locator... 3

Chapter 2 Autodesk Asset Locator... 3 Contents Chapter 2 Autodesk Asset Locator....................... 3 Supported Operating Systems....................... 3 Installing Autodesk Asset Locator..................... 4 Define a Search...............................

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

Using UNIX Shell Scripting to Enhance Your SAS Programming Experience

Using UNIX Shell Scripting to Enhance Your SAS Programming Experience Using UNIX Shell Scripting to Enhance Your SAS Programming Experience By James Curley SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute

More information

Geographical Information Systems Institute. Center for Geographic Analysis, Harvard University

Geographical Information Systems Institute. Center for Geographic Analysis, Harvard University Geographical Information Systems Institute Center for Geographic Analysis, Harvard University LAB EXERCISE 5: Queries, Joins: Spatial and Non-spatial 1.0 Getting Census data 1. Go to the American Factfinder

More information

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata..

Stata version 13. First Session. January I- Launching and Exiting Stata Launching Stata Exiting Stata.. Stata version 13 January 2015 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. Windows..... III -...

More information

Adobe Campaign Business Practitioner Adobe Certified Expert Exam Guide. Exam number: 9A0-395

Adobe Campaign Business Practitioner Adobe Certified Expert Exam Guide. Exam number: 9A0-395 Adobe Campaign Business Practitioner Adobe Certified Expert Exam Guide Exam number: 9A0-395 Revised 08 September 2016 About Adobe Certified Expert Exams To be an Adobe Certified Expert is to demonstrate

More information

Conference Users Guide for the GCFA Statistical Input System.

Conference Users Guide for the GCFA Statistical Input System. Conference Users Guide for the GCFA Statistical Input System http://eagle.gcfa.org Published: November 29, 2007 TABLE OF CONTENTS Overview... 3 First Login... 4 Entering the System... 5 Add/Edit Church...

More information

Introduction to Stata Toy Program #1 Basic Descriptives

Introduction to Stata Toy Program #1 Basic Descriptives Introduction to Stata 2018-19 Toy Program #1 Basic Descriptives Summary The goal of this toy program is to get you in and out of a Stata session and, along the way, produce some descriptive statistics.

More information

Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics

Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics Stat 302 Statistical Software and Its Applications SAS: Data I/O & Descriptive Statistics Fritz Scholz Department of Statistics, University of Washington Winter Quarter 2015 February 19, 2015 2 Getting

More information

Data Import and Quality Control in Geochemistry for ArcGIS

Data Import and Quality Control in Geochemistry for ArcGIS Data Import and Quality Control in Geochemistry for ArcGIS This Data Import and Quality Control in Geochemistry for ArcGIS How-To Guide will demonstrate how to create a new geochemistry project, import

More information

STATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany

STATA Tutorial. Introduction to Econometrics. by James H. Stock and Mark W. Watson. to Accompany STATA Tutorial to Accompany Introduction to Econometrics by James H. Stock and Mark W. Watson STATA Tutorial to accompany Stock/Watson Introduction to Econometrics Copyright 2003 Pearson Education Inc.

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

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS

INTRODUCTION TO SAS HOW SAS WORKS READING RAW DATA INTO SAS TO SAS NEED FOR SAS WHO USES SAS WHAT IS SAS? OVERVIEW OF BASE SAS SOFTWARE DATA MANAGEMENT FACILITY STRUCTURE OF SAS DATASET SAS PROGRAM PROGRAMMING LANGUAGE ELEMENTS OF THE SAS LANGUAGE RULES FOR SAS

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

An Introduction to R- Programming

An Introduction to R- Programming An Introduction to R- Programming Hadeel Alkofide, Msc, PhD NOT a biostatistician or R expert just simply an R user Some slides were adapted from lectures by Angie Mae Rodday MSc, PhD at Tufts University

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

Understanding Crime Pattern in United States by Time Series Analysis using SAS Tools

Understanding Crime Pattern in United States by Time Series Analysis using SAS Tools SESUG Paper 264-2018 Understanding Crime Pattern in United States by Time Series Analysis using SAS Tools Soumya Ranjan Kar Choudhury, Oklahoma State University, Stillwater, OK; Agastya Komarraju, Sam

More information

BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA

BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA BIOSTATISTICS LABORATORY PART 1: INTRODUCTION TO DATA ANALYIS WITH STATA: EXPLORING AND SUMMARIZING DATA Learning objectives: Getting data ready for analysis: 1) Learn several methods of exploring the

More information

STATION

STATION ------------------------------STATION 1------------------------------ 1. Which of the following statements displays all user-defined macro variables in the SAS log? a) %put user=; b) %put user; c) %put

More information

Tabulating Patients, Admissions and Length-of-Stay By Dx Category, Fiscal Year, County and Age Group

Tabulating Patients, Admissions and Length-of-Stay By Dx Category, Fiscal Year, County and Age Group Tabulating Patients, Admissions and Length-of-Stay By Dx Category, Fiscal Year, County and Age Group Step One: Extracting Data Use an array in a data step to search all the Dx Codes in one pass. The array

More information