Stata Review: Part II Biost/Epi 536 Discussion Section October 13, 2009.

Slides:



Advertisements
Similar presentations
1 SESSION 5 Graphs for data analysis. 2 Objectives To be able to use STATA to produce exploratory and presentation graphs In particular Bar Charts Histograms.
Advertisements

Displaying Data Objectives: Students should know the typical graphical displays for the different types of variables. Students should understand how frequency.
BODY MASS INDEX (B.M.I.).
R Language. What is R? Variables in R Summary of data Box plot Histogram Using Help in R.
Basics of Biostatistics for Health Research Session 2 – February 14 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.
Fall 2013Biostat 5110 (Biostatistics 511) Discussion Section Week 4 Sandrine Moutou Medical Biometry I.
Exercise session # 1 Random data generation Jan Matuska November, 2006 Labor Economics.
B - body M - mass I - index. The body mass index (BMI), or Quetelet index, is a measure for human body shape based on an individual's weight and height.
Chapter 2 Minitab for Data Analysis KANCHALA SUDTACHAT.
SCATTER PLOTS AND SMOOTHING. An Example – Car Stopping Distances An experiment was conducted to measure how the stopping distance of a car depends on.
SJTU CMGPD 2012 Methodological Lecture Day 2 TABLE, COLLAPSE, HISTOGRAM, TWOWAY BAR.
Business Statistics: A Decision-Making Approach, 7e © 2008 Prentice-Hall, Inc. Chap 2-1 Business Statistics: A Decision-Making Approach 7 th Edition Chapter.
1 Multiple Regression EPP 245/298 Statistical Analysis of Laboratory Data.
Additional HW Exercise (a) The breaking strength in pounds of force is being studied for two metal alloys, labeled S and T, and for different temperatures.
Two-Way Frequency Tables
An Introduction into Stata I Prof. Dr. Herbert Brücker University of Bamberg Seminar “Migration and the Labour Market” Session 3, June 9, 2011.
SPSS Statistical Package for the Social Sciences is a statistical analysis and data management software package. SPSS can take data from almost any type.
Alok Srivastava Chapter 2 Describing Data: Graphs and Tables Basic Concepts Frequency Tables and Histograms Bar and Pie Charts Scatter Plots Time Series.
Daily Trivia This little girl is sick. And sad .
Body Mass Index (BMI) This is the most commonly used index of over or underweight Body Mass Index = body weight ( Height) squared ClassificationBMI.
How to Analyze Data? Aravinda Guntupalli. SPSS windows process Data window Variable view window Output window Chart editor window.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 9- 1 Homework, Page 756 Use mathematical induction to prove that the.
Secondary National Strategy Handling Data Graphs and charts Created by J Lageu, KS3 ICT Consultant – Coventry Based on the Framework for teaching mathematics.
(c) 2007 IUPUI SPEA K300 (4392) Outline: Graphical Methods Graphical versus Numerical Methods Frequency distributions (tables) Histogram Stem-and-leaf.
1 The Receiver Operating Characteristic (ROC) Curve EPP 245 Statistical Analysis of Laboratory Data.
WHAT IS BMI? BMI BODY MASS INDEX- BASED ON HEIGHT AND WEIGHT TO DETERMINE AMOUNT OF FAT AN INDIVIDUAL HAS OBESE BMI > 30.
Stata Workshop #1 Chiu-Hsieh (Paul) Hsu Associate Professor College of Public Health
Key Data Management Tasks in Stata
Tricks in Stata Anke Huss Generating „automatic“ tables in a do-file.
Biostat 200 Introduction to Biostatistics 1. Lecture 1 2.
Picturing Distributions with Graphs BPS 7e Chapter 1 © 2014 W. H. Freeman and Company.
Definition A scatter plot is a relationship between multiple(two) sets of data graphed with plotted points. Instead of two separate graphs, scatter plots.
Biostat 200 Lecture Simple linear regression Population regression equationμ y|x = α +  x α and  are constants and are called the coefficients.
Measuring adult BMI using the Active People Survey Caroline Hancock | SEPHIG 26 March 2014.
How to Calculate Your Body Mass Index (BMI)
 Some variables are inherently categorical, for example:  Sex  Race  Occupation  Other categorical variables are created by grouping values of a.
Section 1-1 Day One Types of Data Bar Graphs, Pie Charts Dots Plots, Stem and leaf plots, Histograms.
Graphing Basics. Creating a graph Draw the y-axis on the vertical axis and the X-axis on the horizontal one Label what variable is on each of the axis.
Basics of Biostatistics for Health Research Session 3 – February 21, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences.
Thinking about Graphs The Grammar of Graphics and Stata.
DTC Quantitative Methods Summary of some SPSS commands Weeks 1 & 2, January 2012.
SW388R6 Data Analysis and Computers I Slide 1 Comparing Central Tendency and Variability across Groups Impact of Missing Data on Group Comparisons Sample.
Basics of Biostatistics for Health Research Session 4 – February 28, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences.
Day 11 Methodological Lecture Migration. Measuring migration Create a event variable from comparison of unique values of UNIQUE_VILLAGE_ID Make sure to.
Stata Review Session Economics 1018 Abby Williamson and Hongyi Li November 17, 2006.
Mar-16H.S.1Mar-16H.S.1 Stata 5, Mixed Models Not finished Hein Stigum Presentation, data and programs at:
Basics in R part 2. Variable types in R Common variable types: Numeric - numeric value: 3, 5.9, Logical - logical value: TRUE or FALSE (1 or 0)
Algebra 1 Section 4.1 Plot points and scatter plots To locate a point in a plane, you can use an ordered pair in the form (x,y) in a Cartesian Coordinate.
Descriptive Statistics using R. Summary Commands An essential starting point with any set of data is to get an overview of what you are dealing with You.
Write a statistical question you could ask your classmates about the movies they like.
Setting up your database And codebook. What is a codebook? It is a description of all your variables How they were created How they are scored Includes.
UOP SCI 228 Week 6 iLab Check this A+ tutorial guideline at For more classes visit
How to Calculate Your Body Mass Index (BMI)
Statistical Analysis – Part 3
QM222 Class 13 Section D1 Omitted variable bias (Chapter 13.)
The Skinny on High School
Depressive symptoms & perceived weight among middle-school students
Correlation – Regression
Weightproblems by teenagers
Ms jorgensen Unit 1: Statistics and Graphical Representations
Lab 2 Data Manipulation and Descriptive Stats in R
Week 5 Lecture 2 Chapter 8. Regression Wisdom.
Presentation, data and programs at:
Supplemental Table 1: Differences in mean BMI-SDS between 2005 and 2015 – the obese lose weight while the overweight stabilize or even increase weight.
APPLIED DATA ANALYSIS/ANALYTICS using STATA M.A.Isiaka FCMA, ACA, CIIA, ANIMN, PhD Department of Economics, Accounting & Finance College of Management.
CMGPD-LN Methodological Lecture Day 4
Sang-Hyop Lee & Comfort Sumida 3rd NTA Workshop January 21, 2006
Ordinary Least Square estimator using STATA
Two to 20 years: female patients, continued.
Presentation transcript:

Stata Review: Part II Biost/Epi 536 Discussion Section October 13, 2009

Indicator (Dummy) Variables Created from an existing categorical variable (e.g., bmicat ) Assigned value of 0 or 1 1, if the condition is true 0, if the condition is false bmicat BMI (categorical) type: numeric (float) label: bmicat_label range: [0,3] units: 1 unique values: 4 missing.: 5/60 tabulation: Freq. Numeric Label 10 0 Underweight 17 1 Normal 17 2 Overweight 11 3 Obese 5.

Indicator (Dummy) Variables Example: bmicat X b0 = 1underweight 0otherwise X b1 = 1normal 0otherwise X b2 = 1overweight 0otherwise X b3 = 1obese 0otherwise

Generating Indicator (Dummy) Variables Option 1: Use generate ( gen ) command gen underwt = (bmicat==0) if bmicat!=. gen normwt = (bmicat==1) if bmicat!=. gen overwt = (bmicat==2) if bmicat!=. gen obese = (bmicat==3) if bmicat!=.

Generating Indicator (Dummy) Variables Option 1: Use generate ( gen ) command. list bmicat underwt normwt overwt obese in 31/ | bmicat underwt normwt overwt obese | | | 31. | Normal | 32. | Overweight | 33. |..... | 34. | Overweight | 35. | Underweight | | | 36. | Normal | 37. | Overweight | 38. | Obese | 39. | Overweight | 40. | Underweight |

Generating Indicator (Dummy) Variables Option 2: Use tabulate command with generate option tabulate bmicat, generate(bmigrp). tabulate bmicat, generate(bmigrp) BMI | (categorica | l) | Freq. Percent Cum Underweight | Normal | Overweight | Obese | Total |

Generating Indicator (Dummy) Variables Option 2: Use tabulate command with generate option. list bmicat bmigrp1-bmigrp4 in 31/ | bmicat bmigrp1 bmigrp2 bmigrp3 bmigrp4 | | | 31. | Normal | 32. | Overweight | 33. |..... | 34. | Overweight | 35. | Underweight | | | 36. | Normal | 37. | Overweight | 38. | Obese | 39. | Overweight | 40. | Underweight |

Graphing in Stata 10

Creating Histograms Stata command: hist Example: Histogram of height, by sex hist height, by(sex)

Creating Histograms Stata command: hist Attach value labels to variable(s) of interest Use formatting options Example revisited: Histogram of height, by sex hist height, by(sex, title(“Distribution of height by sex”) note(“”)) xtitle(“height(in)”) scheme(s1mono)

Creating Box Plots Stata command: graph box Example: Box plot of height, by sex graph box height, by(sex, title(Boxplots of height by sex) note(“”)) ytitle(height(in)) scheme(s1mono)

Creating Box Plots Stata command: graph box Now using over option Example: Box plot of height, by sex graph box height, over(sex) title(“Boxplots of height by sex”) ytitle(“height(in)”) scheme(s1mono)

Creating Scatter Plots Stata command: scatter Example: Scatter plot of height and weight scatter height weight

Creating Scatter Plots Stata command: scatter Example: Scatter plot of height and weight by sex, with lowess smoothing twoway (scatter height weight if sex==0) /// (scatter height weight if sex==1) /// (lowess height weight if sex==0) /// (lowess height weight if sex==1)

Creating Scatter Plots Stata command: scatter Use formatting options Example revisited: Scatter plot of height and weight by sex, with lowess smoothing twoway(scatter height weight if sex==0,ms(D)) (scatter height weight if sex==1, ms(Oh)) (lowess height weight if sex==0) (lowess height weight if sex==1),scheme(s2mono) legend(col(2)order(1 “females” 2 “males” 3 “lowess females” 4 “lowess males”)) xtitle(weight(lbs)) ytitle(height(in)) title(Height vs. weight by sex) xlab(100(25)200) ylab(50(5)80)

Combining Graphs Stata command: graph combine Example: Histogram and box plot of height hist height, scheme(s1mono) name(hist) graph box height, scheme(s1mono) name(box) graph combine hist box, scheme(s1mono) title(distribution of height)