Presentation is loading. Please wait.

Presentation is loading. Please wait.

EHS 655 Lecture 3: Types of data, basic Stata commands

Similar presentations


Presentation on theme: "EHS 655 Lecture 3: Types of data, basic Stata commands"— Presentation transcript:

1 EHS 655 Lecture 3: Types of data, basic Stata commands

2 What we’ll cover today The basics Types and scales of data
Stata – basic commands

3 THE BASICS: UNDERSTANDING EXPOSURE
White E, Armstrong BK, Saracci R. 2008

4 Exposure assessment approaches
Nieuwenhuijsen M, Paustenbach D, Duarte-Davidson R. 2006

5 Exposure data examples

6 Exposure data examples
Ignacio and Bullock, AIHA, 2006

7 TYPES AND SCALES OF DATA Binary and nominal
Values only used as labels Binary = two categories Nominal >= two categories Tells nothing about individual’s ranking Examples? Binary: gender Nominal: occupation (if not ordered in some way related to exposure) White E, Armstrong BK, Saracci R. 2008

8 Scales of data - ordinal
Values used indicate rank ordering Differences between numbers do not indicate actual size of differences Examples? Socioeconomic status Crude categories of exposure (e.g., exposed daily, weekly, monthly, yearly) White E, Armstrong BK, Saracci R. 2008

9 Scales of data - interval
Relative values of assigned numbers reflect true differences in underlying values Zero point is arbitrary Examples? Fahrenheit or Celsius temperature scale Year of birth or any other variable using calendar time White E, Armstrong BK, Saracci R. 2008

10 Scales of data - ratio Allows valid comparison of measurements by calculation of true difference and ratio Zero point of scale is true zero point Examples? Someone who ingests 500 mg of vitamin C daily consumes 2X as much as someone who ingests 250 mg daily White E, Armstrong BK, Saracci R. 2008

11 Exercise Imagine a study of exposure to 1,4 dioxane in drinking water among community members in Ann Arbor Think of an example of potentially relevant exposure information for each of following data scales: Binary Nominal Ordinal Interval Ratio

12 Data types associated with exposure assessment methods
Typical data type Personal interviews Nominal or ordinal Self-administered questionnaires Proxy respondents Diaries Nominal, ordinal, interval, ratio Observations Nominal, ordinal, interval Records evaluations Measurements (personal or environmental) Ratio

13 Ramifications of data scales
When exposures can be quantified, best to capture as quantitative rather than categorical E.g., #cigarettes per day instead of <14, 15-24, 35-34, etc. Even if categories equally sized, mean value in each category cannot be computed Can always collapse quantitative to categorical – but not vice versa May even want to do this, as ordinal is easy to understand, makes no dose-response assumptions White E, Armstrong BK, Saracci R. 2008

14 On to Stata

15 On to Stata

16 On to Stata Basic file commands Basic dataset summary commands
Open/start do-file Clear memory (“clear all”) Import file (“import”) Open file (“use”) Export file (“export”) Save file (“save”) with “, replace” option Basic dataset summary commands Table of all variables (“describe”) Summarize all variables (“summarize”) with “, detail” option Examine all variable names, labels, data (“codebook”) with “, compact” and “, problems” option

17 On to Stata Basic data manipulation commands
Define label/name for a variable (“label variable”) Create labels (“label define”) Assign labels to variable (“label values”) Rename variable (“rename”) Generate a new variable (“generate”) Replace an existing variable (“replace”) How can you use M+Box to store your datafile? What commands did you use or try for the homework assignment?

18 On to Stata Homework assignment file
What did you find in the homework? Anyone have to use the “Break” button? Anyone start a do-file? Figure out how to run it?


Download ppt "EHS 655 Lecture 3: Types of data, basic Stata commands"

Similar presentations


Ads by Google