Basics of Biostatistics for Health Research Session 2 – February 14 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.

Slides:



Advertisements
Similar presentations
Summary Statistics/Simple Graphs in SAS/EXCEL/JMP.
Advertisements

STATISTICAL ANALYSIS. Your introduction to statistics should not be like drinking water from a fire hose!!
Describing Quantitative Variables
Lesson Describing Distributions with Numbers parts from Mr. Molesky’s Statmonkey website.
Descriptive Measures MARE 250 Dr. Jason Turner.
Fall 2013Biostat 5110 (Biostatistics 511) Discussion Section Week 4 Sandrine Moutou Medical Biometry I.
Data analysis: Explore GAP Toolkit 5 Training in basic drug abuse data management and analysis Training session 9.
WINKS SDA Statistical Data Analysis (Windows Kwikstat) Getting Started Guide.
Data analysis Incorporating slides from IS208 (© Yale Braunstein) to show you how 208 and 214 are telling you many of the the same things; and how to use.
Descriptive Statistics In SAS Exploring Your Data.
Sociology 601(Martin) Lecture for week 2: September Chapter 3.1: –Making Charts Chapter 3.2 – 3.5 (if time permits) –Measures of central tendency.
Measures of Central Tendency MARE 250 Dr. Jason Turner.
Statistical Analysis SC504/HS927 Spring Term 2008 Week 17 (25th January 2008): Analysing data.
Chapter 19 Data Analysis Overview
1 Introduction to biostatistics Lecture plan 1. Basics 2. Variable types 3. Descriptive statistics: Categorical data Categorical data Numerical data Numerical.
Stats & Excel Crash Course Jim & Sam April 8, 2014.
How to Analyze Data? Aravinda Guntupalli. SPSS windows process Data window Variable view window Output window Chart editor window.
PY550 Research and Statistics Dr. Mary Alberici Central Methodist University.
Describing distributions with numbers
Descriptive Statistics Used to describe the basic features of the data in any quantitative study. Both graphical displays and descriptive summary statistics.
1 Statistical Analysis - Graphical Techniques Dr. Jerrell T. Stracener, SAE Fellow Leadership in Engineering EMIS 7370/5370 STAT 5340 : PROBABILITY AND.
Tutor: Prof. A. Taleb-Bendiab Contact: Telephone: +44 (0) CMPDLLM002 Research Methods Lecture 9: Quantitative.
Go to Index Analysis of Means Farrokh Alemi, Ph.D. Kashif Haqqi M.D.
M07-Numerical Summaries 1 1  Department of ISM, University of Alabama, Lesson Objectives  Learn when each measure of a “typical value” is appropriate.
Chapter 2 Describing Data.
Biostatistics Class 1 1/25/2000 Introduction Descriptive Statistics.
Lecture 5 Dustin Lueker. 2 Mode - Most frequent value. Notation: Subscripted variables n = # of units in the sample N = # of units in the population x.
Categorical vs. Quantitative…
T T03-01 Calculate Descriptive Statistics Purpose Allows the analyst to analyze quantitative data by summarizing it in sorted format, scattergram.
1 An Introduction to SPSS for Windows Jie Chen Ph.D. 6/4/20161.
Analyses using SPSS version 19
MMSI – SATURDAY SESSION with Mr. Flynn. Describing patterns and departures from patterns (20%–30% of exam) Exploratory analysis of data makes use of graphical.
Basics of Biostatistics for Health Research Session 3 – February 21, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences.
Basics of Biostatistics for Health Research Session 1 – February 7 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health.
SPSS Workshop Day 2 – Data Analysis. Outline Descriptive Statistics Types of data Graphical Summaries –For Categorical Variables –For Quantitative Variables.
Chapter Eight: Using Statistics to Answer Questions.
Describing Distributions with Numbers Chapter 2. What we will do We are continuing our exploration of data. In the last chapter we graphically depicted.
Statistics: Unlocking the Power of Data Lock 5 STAT 250 Dr. Kari Lock Morgan Describing Data: One Quantitative Variable SECTIONS 2.2, 2.3 One quantitative.
Chapter 6: Analyzing and Interpreting Quantitative Data
Mr. Magdi Morsi Statistician Department of Research and Studies, MOH
The field of statistics deals with the collection,
LIS 570 Summarising and presenting data - Univariate analysis.
Statistics with TI-Nspire™ Technology Module E Lesson 1: Elementary concepts.
Basics of Biostatistics for Health Research Session 4 – February 28, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences.
Elementary Analysis Richard LeGates URBS 492. Univariate Analysis Distributions –SPSS Command Statistics | Summarize | Frequencies Presents label, total.
II. Descriptive Statistics (Zar, Chapters 1 - 4).
Research Methods in Politics CHapter 13 1 Research Methods in Politics 13 Calculating and Interpreting Descriptive Statistics.
1 Statistical Analysis - Graphical Techniques Dr. Jerrell T. Stracener, SAE Fellow Leadership in Engineering EMIS 7370/5370 STAT 5340 : PROBABILITY AND.
Statistical Fundamentals: Using Microsoft Excel for Univariate and Bivariate Analysis Alfred P. Rovai Descriptive Statistics – Measures of Relative Position.
Chapter 6: Descriptive Statistics. Learning Objectives Describe statistical measures used in descriptive statistics Compute measures of central tendency.
Chapter 5: Organizing and Displaying Data. Learning Objectives Demonstrate techniques for showing data in graphical presentation formats Choose the best.
Practical Solutions Analysing Continuous Data. 2 1)To produce the overall histogram you can use the options exactly as given. This results in the following.
Statistics and probability Dr. Khaled Ismael Almghari Phone No:
Data Presentation Numerical Summary Measures Chung-Yi Li, PhD Dept. of Public Health, College of Med. NCKU.
Exploratory Data Analysis
EMPA Statistical Analysis
EXPLORATORY DATA ANALYSIS and DESCRIPTIVE STATISTICS
Jonathan W. Duggins; James Blum NC State University; UNC Wilmington
Module 6: Descriptive Statistics
Basic Statistics Overview
Description of Data (Summary and Variability measures)
IET 603 Quality Assurance in Science & Technology
Chapter 3 Describing Data Using Numerical Measures
Georgi Iskrov, MBA, MPH, PhD Department of Social Medicine
Box and Whisker Plots Algebra 2.
Means & Medians.
Descriptive Statistics
Exercise 1 Use Transform  Compute variable to calculate weight lost by each person Calculate the overall mean weight lost Calculate the means and standard.
Georgi Iskrov, MBA, MPH, PhD Department of Social Medicine
Introductory Statistics
Presentation transcript:

Basics of Biostatistics for Health Research Session 2 – February 14 th, 2013 Dr. Scott Patten, Professor of Epidemiology Department of Community Health Sciences & Department of Psychiatry

Go to “ Scroll to the bottom. Right click to download the files described as being “for PGME Students” –One is a dataset –One is a data dictionary Save them on your desktop

Open the Datafile

The task from last week… Create a 95% exact binomial confidence interval for the proportion of people with Framingham with > H.S. education

Review of Last Week’s Task “use” “generate” “recode” “tabulate” “ci”

The actual commands… generate highschool = educ recode highschool 1/2=0 3/4=1 tabulate highschool ci highschool, binomial

Creating a “do” file… 1 2 3

The “do file” editor

Executing a “do” file

What is a “do” file? It is a text file – you can copy and paste from the output window in Stata, or from a word processor It is a computer program that consists of actual commands and therefore doesn’t need a compiler Others would call it a “macro”

Different Types of Data One type of distinction –Nominal (e.g. sex, race) –Ordinal (e.g. rating scales) –Cardinal (e.g. physical measures) Another type of distinction –Categorical (e.g. # of pregnancies) –Continuous (e.g. height, weight)

Body Mass Index (BMI)

The BMI in our Data Set This is an example of a continuous variable

Changing Data Types in Stata (e.g. continuous to categorical) recode bmi x/y=z This will recode all values of the variable bmi having values from x to y to a single value equal to z.

Interpretation of BMI Underweight: < 18.5 Normal weight: 18.5 to 25 Over weight: >25 to 30 Obese: 30+ Your task: Make a “do file” that calculates a 95% confidence interval for the proportion of the population that are overweight or obese.

Example of Code for this… generate owo = bmi recode owo 0/25 = /100 = 1 tab owo, missing ci owo, binomial

Another Task… Add a use command to your do file Save your “do file” on the desktop using a descriptive file name of your choice Exit Stata Open Stata again Open the “do file” editor and select your do file Execute your “do file”

The Power of “do files” Task: Calculate an exact 95% CI for the proportion of the population that are obese (BMI > 30) IMPORTANT: do NOT start from scratch as we did before – try to do this by editing your do file.

generate owo = bmi recode owo 0/25 = /100 = 1 tab owo, missing ci owo, binomial generate owo = bmi generate obese = bmi recode owo 0/25 = /100 = 1 recode obese 0/30 = /100=1 tab owo, missing tab obese, missing ci owo obese, binomial For Example…

Starting a Log File 1 23

Closing a Log File 1 2 3

Another Task… Start a log file Run your “do file” Close and save the resulting log file on your desktop Open your log file

“do file” Etiquette When you add an * before a line on a “do file” Stata will ignore that line Use this to…. –Add descriptive comments to your code –Remove commands that you don’t want now, but might want later

E.g. Without the Tables…

Review… Make a value label for obesity Attach this value label to the variable representing obesity

Making a Graphic

The Pie Chart Dialogue Box Find the Variable that you made 1 2

Unedited Output

The Graph Editor

Here is a good place to start

See if you can do these things… Change the color of the pie Add a title Add a comment Change the background Create a work of art

Save in a Standard Format

Back to BMI May not wish to categorize variables like this Measures of central tendency –Mode –Median –Mean Different types of graphs are useful for examining continuous variables –Box plots –Histograms

Box Plots

Terminology Median: value with 50% of observations above and 50% below. Interquartile range – contains 50% of observations – plus or minus one quartile Adjacent values (whiskers) – observation that is less than 1.5x the IQR Outliers: anything outside of the adjacent values

Calculating Summary Stats Calculate summary stats for BMI

Calculating Summary Stats Calculate the mean BMI

Calculating Summary Stats Calculate median BMI

Make a Box (and whisker) Plot

The Boxplot Dialogue Box 1 2 Select BMI from the dropdown list

Introducing Histograms 1 2

The Histogram Dialogue Box Select the variable here Select the bin# here

A Task for You to Do… Make 3 histograms of BMI –In one use the default number of bins –In one use a larger number –In one, use a smaller number Save your favorite histogram Open it in the graph editor, give it a title and improve its appearance Save it in a standard form (e.g. png, jpg, tif)

Assessing Normality with a Histogram

The distribution is not quite normal, but close

Is BMI Higher in Men or Women? We could use confidence intervals to assess this… E.g

Here is the dialogue box… Once you’ve selected BMI, click this

The dialogue box, continued.. Enter sex as a group variable

The output

It looks better with value labels

Statistical Tests Start with an hypothesis that an “effect” exists –In this case, that there is an effect of sex on BMI Assume that the effect DOES NOT exist –This is the null hypothesis Find the probability of results, or those more extreme given the null hypothesis –This is what the “test” calculates for you If the null is unlikely (alpha value), reject it

The t-test (assumptions) The variables are approximately normally distributed The standard deviations of the two groups are approximately equal The two samples are independent

Using summarize similarly Use summarize with “by” in the dialogue box Use histograms with a normal density plot and the “by” tab in the dialogue box Your task: use these two techniques to assess the t-test assumptions.

Variance Comparisons 1 2 3

The t-test 1 2 3

The t-test dialogue box optional

The output

Two group tests for proportions

You can also do this with tab tab obese sex, exact

Your Final Task for Today Create a “do file” that … –Reads in the data –Recodes BMI to a categorical variable for obesity –Tests whether obesity differs between men and women Create a log file to store the results