PubHlth 640 Intermediate Biostatistics Unit 2 Regression and Correlation

Size: px
Start display at page:

Download "PubHlth 640 Intermediate Biostatistics Unit 2 Regression and Correlation"

Transcription

1 PubHlth 640 Intermediate Biostatistics Unit 2 Regression and Correlation Multiple Linear Regression Software: Stata v 10.1 Human p53 and Breast Cancer Risk Source: Matthews et al. Parity Induced Protection Against Breast Cancer Background: Substantial epidemiologic evidence suggests that early first pregnancy confers a reduced life time risk of breast cancer. In laboratory studies of mice, similar observations have been made. Laboratory studies of mice have also explored the relationship between parity, expression of the tumor suppressor gene p53 and subsequent breast cancer tumor development. Lesley et al hypothesized that mammary tissue cultured from women who had an early full term pregnancy would have increased levels of p53 as compared to nulliparous women and as compared to women whose first full term pregnancy was later in life. Research Question: What is the relationship of Y=p53 expression to parity and age at first pregnancy, after adjustment for current age and established breast cancer risk, specifically the following: age at first mensis, family history of breast cancer, menopausal status, and history of oral contraceptive use? Note Age at first pregnancy is considered in each of two ways: (1) continuous, in years; and (2) age at first pregnancy < 24 years versus age at first pregnancy > 24 years. Design: Observational cohort. \stata_howto\multple linear regression p53 parity.doc Page 1 of 13

2 Data file: p53paper.dta Beware! Stata is case sensitive. All variable names are lower case. Variable Label Definition/Codings p53 P53 continuous parous Parity status 1 = ever parous 0 = not pregnum Number of pregnancies 0 = 0 pregnancies 1 = 1 pregnancy 2 = 2 pregnancies 3 = 3+ pregnancies one 0/1 indicator of 1 pregnancy = 1 if (pregnum=1) 0 otherwise two 0/1 indicator of 2 pregnancies = 1 if (pregnum=2) 0 otherwise threep 0/1 indicator of 2 or more pregnancies = 1 if (pregnum=3) 0 otherwise agepreg1 Age at first pregnancy Continuous, years = missing for never parous early late 0/1 indicator first pregnancy at age < 24 0/1 indicator first pregnancy at age >24 1 = yes 0 = no = missing for never parous 1 = yes 0 = no = missing for never parous agecurr Current age continuous, years agemen Age at first mensis Continuous, years famhx01 0/1 indicator of family history of breast cancer menop 0/1 indicator of post-menopause = 1 if yes 0 otherwise oc 0/1 indicator of ever used oral = 1 if yes contraceptives 0 otherwise = 1 if any family hx of breast ca 0 otherwise \stata_howto\multple linear regression p53 parity.doc Page 2 of 13

3 Key Green: comments in stata begin with an asterisk Black: stata command syntax. Note You do NOT need to type the leading period Blue: Output I have also inserted comments. * toggle off the screen by screen pausing of output. set more off. * FILE > OPEN to read in data p53paper.dta. use "/Users/carolbigelow/Desktop/p53paper.dta". * Compact description of data set. codebook,compact Variable Obs Unique Mean Min Max Label id agecurr agecurr: age current agepreg agepreg1: age at 1st preg pregnum pregnum: number pregnancies agemen agemen: age at 1st mensis menop menop: post menopausal oc oc: oral contraceptives hrt hrt: hormone replacement cycle cycle: cycle days famhx famhx: family hx breast ca p parity parity: parity, grouped early early: early parity late late: late parity parous parous 0/1 one one: 1 pregnancy two two: 2 pregnancies threep threep: 3+ pregnancies famhx famhx01: any family hx * Characteristics of Analysis Sample. tabstat agecurr, stat(n mean sd min max) variable N mean sd min max agecurr tabstat agemen, stat(n mean sd min max) variable N mean sd min max agemen tabstat agepreg1, stat(n mean sd min max) variable N mean sd min max agepreg \stata_howto\multple linear regression p53 parity.doc Page 3 of 13

4 . tabstat p53, stat(n mean sd min max) variable N mean sd min max p Notice that the sample size is 67 instead of 68, suggesting one missing value.. tab famhx01 famhx01: any family hx Freq. Percent Cum tab hrt hrt: hormone replacement Freq. Percent Cum tab menop menop: post menopausal Freq. Percent Cum tab oc oc: oral contracepti ves Freq. Percent Cum tab parous parous 0/1 Freq. Percent Cum \stata_howto\multple linear regression p53 parity.doc Page 4 of 13

5 . tab early early: early parity Freq. Percent Cum tab late late: late parity Freq. Percent Cum tab pregnum pregnum: number pregnancies Freq. Percent Cum * Check normality of distribution of Y=p53. tabstat p53, stat(n mean sd med min max) variable N mean sd p50 min max p * identify tick marks at multiples of sd for use in histogram w overlay normal. display (1* ) display (2* ) display (3* ) display (1* ) display (2* ) display (3* ) * (optional) choose the design you want for your graphs. set scheme s1color \stata_howto\multple linear regression p53 parity.doc Page 5 of 13

6 . * Histogram of Distribution of p53 with tick marks at each sd unit. histogram p53, start(1) bin(8) frequency addlabels normal ylabel(0(5)15, grid) xlabel( "mean" "-1 sd" "-2 sd" "-3 sd" "+1 sd" "+2 sd" "+3 sd") title("histogram of Y=P53") subtitle("overlay Normal") note("p53_graph01.png") (bin=8, start=1, width=.625) Source: p53_graph01.png. * Numeical tests of normality of Y=p53. swilk p53 Shapiro-Wilk W test for normal data Variable Obs W V z Prob>z p sfrancia p53 Shapiro-Francia W' test for normal data Variable Obs W' V' z Prob>z p The non-significance of the Shapiro Wilk and the Shapiro Francia tests suggests that it is okay to assume normality of the distribution of Y=p53 \stata_howto\multple linear regression p53 parity.doc Page 6 of 13

7 . * With modest sample size of n=67, it s a good idea to do a dot plot, too. dotplot p53, msymbol(o) title("dotplot of Y=P53") subtitle("n=67") note("p53_graph02.png") Source: p53_graph02.png - Try rotating this picture in your mind by 90 degrees. This gives a better feel for the bell shape distribution of p53 values. * Step 1 - Fit one predictor models. regress p53 parous F( 1, 65) = 9.96 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = parous _cons \stata_howto\multple linear regression p53 parity.doc Page 7 of 13

8 . regress p53 one two threep F( 3, 63) = 5.58 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = one two threep _cons regress p53 agepreg1 Source SS df MS Number of obs = F( 1, 49) = 2.21 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = agepreg _cons regress p53 early late F( 2, 64) = 6.03 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = early late _cons \stata_howto\multple linear regression p53 parity.doc Page 8 of 13

9 . regress p53 agecurr F( 1, 65) = 1.19 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = agecurr _cons regress p53 agemen Source SS df MS Number of obs = F( 1, 64) = 0.98 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = agemen _cons regress p53 famhx F( 1, 65) = 0.02 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = famhx _cons regress p53 menop F( 1, 65) = 0.13 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = menop _cons \stata_howto\multple linear regression p53 parity.doc Page 9 of 13

10 . regress p53 oc F( 1, 65) = 1.13 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = oc _cons * Step 2 - Fit initial multiple predictor model using candidates from step 1. regress p53 two threep early late F( 4, 62) = 4.21 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = two threep early late _cons * Partial F test for EARLY and LATE controlling for TWO and THREEP. testparm early late ( 1) early = 0 ( 2) late = 0 F( 2, 62) = 0.26 Prob > F = * Step 3 - Fit of the smaller model w predictors in Step 2 with adjusted p <.10. regress p53 two threep F( 2, 64) = 8.35 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = two threep _cons \stata_howto\multple linear regression p53 parity.doc Page 10 of 13

11 - You can check the calculation of this partial F test using the two analysis of variance tables: Partial F = 2,62 = = [SS model(4 predictor model) - SS model(2 predictor model)]/ 4 -(2) SS residual(4 predictor model)/ ( n-1) -(4) [ ]/ [ ] / 62 [ ]. * Step 4 - Assess potential confounding of model by EARLY. * Fit of model without confounder. regress p53 two threep F( 2, 64) = 8.35 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = two threep _cons * fit of model with confounder. regress p53 two threep early F( 3, 63) = 5.63 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = two threep early _cons *partial F test of potential confounder. testparm early ( 1) early = 0 F( 1, 63) = 0.37 Prob > F = ( ) \stata_howto\multple linear regression p53 parity.doc Page 11 of 13

12 . * Step 4 - Assess potential confounding of model by LATE. * Fit of model without confounder. regress p53 two threep F( 2, 64) = 8.35 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = two threep _cons * fit of model with confounder. regress p53 two threep late F( 3, 63) = 5.50 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = two threep late _cons *partial F test of potential confounder. testparm late ( 1) late = 0 F( 1, 63) = 0.04 Prob > F = \stata_howto\multple linear regression p53 parity.doc Page 12 of 13

13 . * Step 5 - Investigation of Modification of TWO and THREEP effects by EARLY. * fit of smaller model again. regress p53 two threep F( 2, 64) = 8.35 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = two threep _cons * fit of smaller model + suspected modifier. regress p53 two threep early F( 3, 63) = 5.63 Model Prob > F = Residual R-squared = Adj R-squared = Total Root MSE = two threep early _cons * Partial F test of suspected modifier. testparm early ( 1) early = 0 F( 1, 63) = 0.37 Prob > F = Thus, the final model contains just TWO and THREEP as predictors (see top of page): ˆ p53 = *TWO *THREEP % variance explained = 20.7% Significance of Overall F test =.0006 \stata_howto\multple linear regression p53 parity.doc Page 13 of 13

Stata v 12 Illustration. One Way Analysis of Variance

Stata v 12 Illustration. One Way Analysis of Variance Stata v 12 Illustration Page 1. Preliminary Download anovaplot.. 2. Descriptives Graphs. 3. Descriptives Numerical 4. Assessment of Normality.. 5. Analysis of Variance Model Estimation.. 6. Tests of Equality

More information

Unit 2 Regression and Correlation 2 of 2 - Practice Problems SOLUTIONS Stata Users

Unit 2 Regression and Correlation 2 of 2 - Practice Problems SOLUTIONS Stata Users Unit 2 Regression and Correlation 2 of 2 - Practice Problems SOLUTIONS Stata Users Data Set for this Assignment: Download from the course website: Stata Users: framingham_1000.dta Source: Levy (1999) National

More information

PubHlth Introduction to Biostatistics. 1. Summarizing Data Illustration: STATA version 10 or 11. A Visit to Yellowstone National Park, USA

PubHlth Introduction to Biostatistics. 1. Summarizing Data Illustration: STATA version 10 or 11. A Visit to Yellowstone National Park, USA PubHlth 540 - Introduction to Biostatistics 1. Summarizing Data Illustration: Stata (version 10 or 11) A Visit to Yellowstone National Park, USA Source: Chatterjee, S; Handcock MS and Simonoff JS A Casebook

More information

BIOSTATS 640 Spring 2017 Stata v14 Unit 2: Regression & Correlation. Stata version 14

BIOSTATS 640 Spring 2017 Stata v14 Unit 2: Regression & Correlation. Stata version 14 Stata version 14 Illustration Simple and Multiple Linear Regression February 2017 I- Simple Linear Regression.... 1. Introduction to Example... 2. Preliminaries: Descriptives.. 3. Model Fitting (Estimation)

More information

Bios 312 Midterm: Appendix of Results March 1, Race of mother: Coded as 0==black, 1==Asian, 2==White. . table race white

Bios 312 Midterm: Appendix of Results March 1, Race of mother: Coded as 0==black, 1==Asian, 2==White. . table race white Appendix. Use these results to answer 2012 Midterm questions Dataset Description Data on 526 infants with very low (

More information

Stata Program Notes Biostatistics: A Guide to Design, Analysis, and Discovery Second Edition Chapter 12: Analysis of Variance

Stata Program Notes Biostatistics: A Guide to Design, Analysis, and Discovery Second Edition Chapter 12: Analysis of Variance Stata Program Notes Biostatistics: A Guide to Design, Analysis, and Discovery Second Edition Chapter 12: Analysis of Variance Program Note 12.1 - One-Way ANOVA and Multiple Comparisons The Stata command

More information

Notes on PS2

Notes on PS2 17.871 - Notes on PS2 Mike Sances MIT April 2, 2012 Mike Sances (MIT) 17.871 - Notes on PS2 April 2, 2012 1 / 9 Interpreting Regression: Coecient regress success_rate dist Source SS df MS Number of obs

More information

Exploring Functional Forms: NBA Shots. NBA Shots 2011: Success v. Distance. . bcuse nbashots11

Exploring Functional Forms: NBA Shots. NBA Shots 2011: Success v. Distance. . bcuse nbashots11 NBA Shots 2011: Success v. Distance. bcuse nbashots11 Contains data from http://fmwww.bc.edu/ec-p/data/wooldridge/nbashots11.dta obs: 199,119 vars: 15 25 Oct 2012 09:08 size: 24,690,756 ------------- storage

More information

Introduction of STATA

Introduction of STATA Introduction of STATA News: There is an introductory course on STATA offered by CIS Description: Intro to STATA On Tue, Feb 13th from 4:00pm to 5:30pm in CIT 269 Seats left: 4 Windows, 7 Macintosh For

More information

Lecture 2a: Model building I

Lecture 2a: Model building I Epidemiology/Biostats VHM 812/802 Course Winter 2015, Atlantic Veterinary College, PEI Javier Sanchez Lecture 2a: Model building I Index Page Predictors (X variables)...2 Categorical predictors...2 Indicator

More information

Example Analysis with STATA

Example Analysis with STATA Example Analysis with STATA Exploratory Data Analysis Means and Variance by Time and Group Correlation Individual Series Derived Variable Analysis Fitting a Line to Each Subject Summarizing Slopes by Group

More information

Example Analysis with STATA

Example Analysis with STATA Example Analysis with STATA Exploratory Data Analysis Means and Variance by Time and Group Correlation Individual Series Derived Variable Analysis Fitting a Line to Each Subject Summarizing Slopes by Group

More information

Sociology 7704: Regression Models for Categorical Data Instructor: Natasha Sarkisian. Preliminary Data Screening

Sociology 7704: Regression Models for Categorical Data Instructor: Natasha Sarkisian. Preliminary Data Screening r's age when 1st child born 2 4 6 Density.2.4.6.8 Density.5.1 Sociology 774: Regression Models for Categorical Data Instructor: Natasha Sarkisian Preliminary Data Screening A. Examining Univariate Normality

More information

Soci Statistics for Sociologists

Soci Statistics for Sociologists University of North Carolina Chapel Hill Soci708-001 Statistics for Sociologists Fall 2009 Professor François Nielsen Stata Commands for Module 11 Multiple Regression For further information on any command

More information

. *increase the memory or there will problems. set memory 40m (40960k)

. *increase the memory or there will problems. set memory 40m (40960k) Exploratory Data Analysis on the Correlation Structure In longitudinal data analysis (and multi-level data analysis) we model two key components of the data: 1. Mean structure. Correlation structure (after

More information

Application: Effects of Job Training Program (Data are the Dehejia and Wahba (1999) version of Lalonde (1986).)

Application: Effects of Job Training Program (Data are the Dehejia and Wahba (1999) version of Lalonde (1986).) Application: Effects of Job Training Program (Data are the Dehejia and Wahba (1999) version of Lalonde (1986).) There are two data sets; each as the same treatment group of 185 men. JTRAIN2 includes 260

More information

CHECKING INFLUENCE DIAGNOSTICS IN THE OCCUPATIONAL PRESTIGE DATA

CHECKING INFLUENCE DIAGNOSTICS IN THE OCCUPATIONAL PRESTIGE DATA PLS 802 Spring 2018 Professor Jacoby CHECKING INFLUENCE DIAGNOSTICS IN THE OCCUPATIONAL PRESTIGE DATA This handout shows the log from a Stata session that examines the Duncan Occupational Prestige data

More information

COMPARING MODEL ESTIMATES: THE LINEAR PROBABILITY MODEL AND LOGISTIC REGRESSION

COMPARING MODEL ESTIMATES: THE LINEAR PROBABILITY MODEL AND LOGISTIC REGRESSION PLS 802 Spring 2018 Professor Jacoby COMPARING MODEL ESTIMATES: THE LINEAR PROBABILITY MODEL AND LOGISTIC REGRESSION This handout shows the log of a STATA session that compares alternative estimates of

More information

İnsan Tunalı November 29, 2018 Econ 511: Econometrics I. ANSWERS TO ASSIGNMENT 10: Part II STATA Supplement

İnsan Tunalı November 29, 2018 Econ 511: Econometrics I. ANSWERS TO ASSIGNMENT 10: Part II STATA Supplement İnsan Tunalı November 29, 2018 Econ 511: Econometrics I STATA Exercise 1 ANSWERS TO ASSIGNMENT 10: Part II STATA Supplement TASK 1: --- name: log: g:\econ511\heter_housinglog log type: text opened

More information

Longitudinal Data Analysis, p.12

Longitudinal Data Analysis, p.12 Biostatistics 140624 2011 EXAM STATA LOG ( NEEDED TO ANSWER EXAM QUESTIONS) Multiple Linear Regression, p2 Longitudinal Data Analysis, p12 Multiple Logistic Regression, p20 Ordered Logistic Regression,

More information

Topics in Biostatistics Categorical Data Analysis and Logistic Regression, part 2. B. Rosner, 5/09/17

Topics in Biostatistics Categorical Data Analysis and Logistic Regression, part 2. B. Rosner, 5/09/17 Topics in Biostatistics Categorical Data Analysis and Logistic Regression, part 2 B. Rosner, 5/09/17 1 Outline 1. Testing for effect modification in logistic regression analyses 2. Conditional logistic

More information

Biostatistics 208. Lecture 1: Overview & Linear Regression Intro.

Biostatistics 208. Lecture 1: Overview & Linear Regression Intro. Biostatistics 208 Lecture 1: Overview & Linear Regression Intro. Steve Shiboski Division of Biostatistics, UCSF January 8, 2019 1 Organization Office hours by appointment (Mission Hall 2540) E-mail to

More information

Group Comparisons: Using What If Scenarios to Decompose Differences Across Groups

Group Comparisons: Using What If Scenarios to Decompose Differences Across Groups Group Comparisons: Using What If Scenarios to Decompose Differences Across Groups Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 15, 2015 We saw that the

More information

* STATA.OUTPUT -- Chapter 5

* STATA.OUTPUT -- Chapter 5 * STATA.OUTPUT -- Chapter 5.*bwt/confounder example.infile bwt smk gest using bwt.data.correlate (obs=754) bwt smk gest -------------+----- bwt 1.0000 smk -0.1381 1.0000 gest 0.3629 0.0000 1.0000.regress

More information

Milk Data Analysis. 1. Objective: analyzing protein milk data using STATA.

Milk Data Analysis. 1. Objective: analyzing protein milk data using STATA. 1. Objective: analyzing protein milk data using STATA. 2. Dataset: Protein milk data set (in the class website) Data description: Percentage protein content of milk samples at weekly intervals from each

More information

SOCY7706: Longitudinal Data Analysis Instructor: Natasha Sarkisian Two Wave Panel Data Analysis

SOCY7706: Longitudinal Data Analysis Instructor: Natasha Sarkisian Two Wave Panel Data Analysis SOCY7706: Longitudinal Data Analysis Instructor: Natasha Sarkisian Two Wave Panel Data Analysis In any longitudinal analysis, we can distinguish between analyzing trends vs individual change that is, model

More information

PREDICTIVE MODEL OF TOTAL INCOME FROM SALARIES/WAGES IN THE CONTEXT OF PASAY CITY

PREDICTIVE MODEL OF TOTAL INCOME FROM SALARIES/WAGES IN THE CONTEXT OF PASAY CITY Page22 PREDICTIVE MODEL OF TOTAL INCOME FROM SALARIES/WAGES IN THE CONTEXT OF PASAY CITY Wilson Cordova wilson.cordova@cksc.edu.ph Chiang Kai Shek College, Philippines Abstract There are varied sources

More information

The Multivariate Regression Model

The Multivariate Regression Model The Multivariate Regression Model Example Determinants of College GPA Sample of 4 Freshman Collect data on College GPA (4.0 scale) Look at importance of ACT Consider the following model CGPA ACT i 0 i

More information

Midterm Exam. Friday the 29th of October, 2010

Midterm Exam. Friday the 29th of October, 2010 Midterm Exam Friday the 29th of October, 2010 Name: General Comments: This exam is closed book. However, you may use two pages, front and back, of notes and formulas. Write your answers on the exam sheets.

More information

Biostatistics 208 Data Exploration

Biostatistics 208 Data Exploration Biostatistics 208 Data Exploration Dave Glidden Professor of Biostatistics Univ. of California, San Francisco January 8, 2008 http://www.biostat.ucsf.edu/biostat208 Organization Office hours by appointment

More information

Checking the model. Linearity. Normality. Constant variance. Influential points. Covariate overlap

Checking the model. Linearity. Normality. Constant variance. Influential points. Covariate overlap Checking the model Linearity Normality Constant variance Influential points Covariate overlap 1 Checking the model: linearity Average value of outcome initially assumed to be linear function of continuous

More information

PSC 508. Jim Battista. Dummies. Univ. at Buffalo, SUNY. Jim Battista PSC 508

PSC 508. Jim Battista. Dummies. Univ. at Buffalo, SUNY. Jim Battista PSC 508 PSC 508 Jim Battista Univ. at Buffalo, SUNY Dummies Dummy variables Sometimes we want to include categorical variables in our models Numerical variables that don t necessarily have any inherent order and

More information

Survey commands in STATA

Survey commands in STATA Survey commands in STATA Carlo Azzarri DECRG Sample survey: Albania 2005 LSMS 4 strata (Central, Coastal, Mountain, Tirana) 455 Primary Sampling Units (PSU) 8 HHs by PSU * 455 = 3,640 HHs svy command:

More information

ROBUST ESTIMATION OF STANDARD ERRORS

ROBUST ESTIMATION OF STANDARD ERRORS ROBUST ESTIMATION OF STANDARD ERRORS -- log: Z:\LDA\DataLDA\sitka_Lab8.log log type: text opened on: 18 Feb 2004, 11:29:17. ****The observed mean responses in each of the 4 chambers; for 1988 and 1989.

More information

Read and Describe the SENIC Data

Read and Describe the SENIC Data Read and Describe the SENIC Data If the data come in an Excel spreadsheet (very common), blanks are ideal for missing values. The spreadsheet must be.xls, not.xlsx. Beware of trying to read a.csv file

More information

Trunkierte Regression: simulierte Daten

Trunkierte Regression: simulierte Daten Trunkierte Regression: simulierte Daten * Datengenerierung set seed 26091952 set obs 48 obs was 0, now 48 gen age=_n+17 gen yhat=2000+200*(age-18) gen wage = yhat + 2000*invnorm(uniform()) replace wage=max(0,wage)

More information

= = Intro to Statistics for the Social Sciences. Name: Lab Session: Spring, 2015, Dr. Suzanne Delaney

= = Intro to Statistics for the Social Sciences. Name: Lab Session: Spring, 2015, Dr. Suzanne Delaney Name: Intro to Statistics for the Social Sciences Lab Session: Spring, 2015, Dr. Suzanne Delaney CID Number: _ Homework #22 You have been hired as a statistical consultant by Donald who is a used car dealer

More information

Chapter 5 Regression

Chapter 5 Regression Chapter 5 Regression Topics to be covered in this chapter: Regression Fitted Line Plots Residual Plots Regression The scatterplot below shows that there is a linear relationship between the percent x of

More information

Table. XTMIXED Procedure in STATA with Output Systolic Blood Pressure, use "k:mydirectory,

Table. XTMIXED Procedure in STATA with Output Systolic Blood Pressure, use k:mydirectory, Table XTMIXED Procedure in STATA with Output Systolic Blood Pressure, 2001. use "k:mydirectory,. xtmixed sbp nage20 nage30 nage40 nage50 nage70 nage80 nage90 winter male dept2 edu_bachelor median_household_income

More information

Analyzing CHIS Data Using Stata

Analyzing CHIS Data Using Stata Analyzing CHIS Data Using Stata Christine Wells UCLA IDRE Statistical Consulting Group February 2014 Christine Wells Analyzing CHIS Data Using Stata 1/ 34 The variables bmi p: BMI povll2: Poverty level

More information

Regression diagnostics

Regression diagnostics Regression diagnostics Biometry 755 Spring 2009 Regression diagnostics p. 1/48 Introduction Every statistical method is developed based on assumptions. The validity of results derived from a given method

More information

Lab 1: A review of linear models

Lab 1: A review of linear models Lab 1: A review of linear models The purpose of this lab is to help you review basic statistical methods in linear models and understanding the implementation of these methods in R. In general, we need

More information

Never Smokers Exposure Case Control Yes No

Never Smokers Exposure Case Control Yes No Question 0.4 Never Smokers Exosure Case Control Yes 33 7 50 No 86 4 597 29 428 647 OR^ Never Smokers (33)(4)/(7)(86) 4.29 Past or Present Smokers Exosure Case Control Yes 7 4 2 No 52 3 65 69 7 86 OR^ Smokers

More information

Week 10: Heteroskedasticity

Week 10: Heteroskedasticity Week 10: Heteroskedasticity Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline The problem of (conditional)

More information

Foley Retreat Research Methods Workshop: Introduction to Hierarchical Modeling

Foley Retreat Research Methods Workshop: Introduction to Hierarchical Modeling Foley Retreat Research Methods Workshop: Introduction to Hierarchical Modeling Amber Barnato MD MPH MS University of Pittsburgh Scott Halpern MD PhD University of Pennsylvania Learning objectives 1. List

More information

ECONOMICS AND ECONOMIC METHODS PRELIM EXAM Statistics and Econometrics May 2011

ECONOMICS AND ECONOMIC METHODS PRELIM EXAM Statistics and Econometrics May 2011 ECONOMICS AND ECONOMIC METHODS PRELIM EXAM Statistics and Econometrics May 2011 Instructions: Answer all five (5) questions. Point totals for each question are given in parentheses. The parts within each

More information

This is a quick-and-dirty example for some syntax and output from pscore and psmatch2.

This is a quick-and-dirty example for some syntax and output from pscore and psmatch2. This is a quick-and-dirty example for some syntax and output from pscore and psmatch2. It is critical that when you run your own analyses, you generate your own syntax. Both of these procedures have very

More information

Green-comments black-commands blue-output

Green-comments black-commands blue-output PubHlth 640 Spring 2011 Stata v10or 11 Categorical Data Analysis Page 1 of 13 From top menu bar - - Create a log of your session by clicking on FILE > LOG > BEGIN Format the log file as a stata log. At

More information

Week 11: Collinearity

Week 11: Collinearity Week 11: Collinearity Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ARR 1 Outline Regression and holding other

More information

= = Name: Lab Session: CID Number: The database can be found on our class website: Donald s used car data

= = Name: Lab Session: CID Number: The database can be found on our class website: Donald s used car data Intro to Statistics for the Social Sciences Fall, 2017, Dr. Suzanne Delaney Extra Credit Assignment Instructions: You have been hired as a statistical consultant by Donald who is a used car dealer to help

More information

Compartmental Pharmacokinetic Analysis. Dr Julie Simpson

Compartmental Pharmacokinetic Analysis. Dr Julie Simpson Compartmental Pharmacokinetic Analysis Dr Julie Simpson Email: julieas@unimelb.edu.au BACKGROUND Describes how the drug concentration changes over time using physiological parameters. Gut compartment Absorption,

More information

STAT 350 (Spring 2016) Homework 12 Online 1

STAT 350 (Spring 2016) Homework 12 Online 1 STAT 350 (Spring 2016) Homework 12 Online 1 1. In simple linear regression, both the t and F tests can be used as model utility tests. 2. The sample correlation coefficient is a measure of the strength

More information

Elementary tests. proc ttest; title3 'Two-sample t-test: Does consumption depend on Damper Type?'; class damper; var dampin dampout diff ;

Elementary tests. proc ttest; title3 'Two-sample t-test: Does consumption depend on Damper Type?'; class damper; var dampin dampout diff ; Elementary tests /********************** heat2.sas *****************************/ title2 'Standard elementary tests'; options pagesize=35; %include 'heatread.sas'; /* Basically the data step from heat1.sas

More information

17.871: PS3 Key. Part I

17.871: PS3 Key. Part I 17.871: PS3 Key Part I. use "cces12.dta", clear. reg CC424 CC334A [aweight=v103] if CC334A!= 8 & CC424 < 6 // Need to remove values that do not fit on the linear scale. This entails discarding all respondents

More information

(February draft)

(February draft) For an International NGO Background statistics, cross tabs, summaries, graphs, t-tests and regression analysis for Nepal response survey data (February 2017 - draft) Contents Confidence level/statistical

More information

!! NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA ! NOTE: The SAS System used:!

!! NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA ! NOTE: The SAS System used:! 1 The SAS System NOTE: Copyright (c) 2002-2010 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software 9.3 (TS1M0) Licensed to UNIVERSITY OF TORONTO/COMPUTING & COMMUNICATIONS, Site 70072784.

More information

Computer Handout Two

Computer Handout Two Computer Handout Two /******* senic2.sas ***********/ %include 'senicdef.sas'; /* Effectively, Copy the file senicdef.sas to here */ title2 'Elementary statistical tests'; proc freq; title3 'Use proc freq

More information

rat cortex data: all 5 experiments Friday, June 15, :04:07 AM 1

rat cortex data: all 5 experiments Friday, June 15, :04:07 AM 1 rat cortex data: all 5 experiments Friday, June 15, 218 1:4:7 AM 1 Obs experiment stimulated notstimulated difference 1 1 689 657 32 2 1 656 623 33 3 1 668 652 16 4 1 66 654 6 5 1 679 658 21 6 1 663 646

More information

You can find the consultant s raw data here:

You can find the consultant s raw data here: Problem Set 1 Econ 475 Spring 2014 Arik Levinson, Georgetown University 1 [Travel Cost] A US city with a vibrant tourist industry has an industrial accident (a spill ) The mayor wants to sue the company

More information

Chapter 2 Part 1B. Measures of Location. September 4, 2008

Chapter 2 Part 1B. Measures of Location. September 4, 2008 Chapter 2 Part 1B Measures of Location September 4, 2008 Class will meet in the Auditorium except for Tuesday, October 21 when we meet in 102a. Skill set you should have by the time we complete Chapter

More information

Why Are Electricity Prices in RTOs Increasingly Expensive?

Why Are Electricity Prices in RTOs Increasingly Expensive? ROBERT F. MCCULLOUGH, JR. MANAGING PARTNER Date: To: From: Subject: McCullough Research Clients Robert McCullough Heidi Schramm Why Are Electricity Prices in RTOs Increasingly Expensive? For the last two

More information

3. The lab guide uses the data set cda_scireview3.dta. These data cannot be used to complete assignments.

3. The lab guide uses the data set cda_scireview3.dta. These data cannot be used to complete assignments. Lab Guide Written by Trent Mize for ICPSRCDA14 [Last updated: 17 July 2017] 1. The Lab Guide is divided into sections corresponding to class lectures. Each section should be reviewed before starting the

More information

Tabulate and plot measures of association after restricted cubic spline models

Tabulate and plot measures of association after restricted cubic spline models Tabulate and plot measures of association after restricted cubic spline models Nicola Orsini Institute of Environmental Medicine Karolinska Institutet 3 rd Nordic and Baltic countries Stata Users Group

More information

Categorical Variables, Part 2

Categorical Variables, Part 2 Spring, 000 - - Categorical Variables, Part Project Analysis for Today First multiple regression Interpreting categorical predictors and their interactions in the first multiple regression model fit in

More information

ECONOMICS AND ECONOMIC METHODS PRELIM EXAM Statistics and Econometrics May 2014

ECONOMICS AND ECONOMIC METHODS PRELIM EXAM Statistics and Econometrics May 2014 ECONOMICS AND ECONOMIC METHODS PRELIM EXAM Statistics and Econometrics May 2014 Instructions: Answer all five (5) questions. Point totals for each question are given in parentheses. The parts within each

More information

X. Mixed Effects Analysis of Variance

X. Mixed Effects Analysis of Variance X. Mixed Effects Analysis of Variance Analysis of variance with multiple observations per patient These analyses are complicated by the fact that multiple observations on the same patient are correlated

More information

SPSS 14: quick guide

SPSS 14: quick guide SPSS 14: quick guide Edition 2, November 2007 If you would like this document in an alternative format please ask staff for help. On request we can provide documents with a different size and style of

More information

All analysis examples presented can be done in Stata 10.1 and are included in this chapter s output.

All analysis examples presented can be done in Stata 10.1 and are included in this chapter s output. Chapter 9 Stata v10.1 Analysis Examples Syntax and Output General Notes on Stata 10.1 Given that this tool is used throughout the ASDA textbook this chapter includes only the syntax and output for the

More information

3 Ways to Improve Your Targeted Marketing with Analytics

3 Ways to Improve Your Targeted Marketing with Analytics 3 Ways to Improve Your Targeted Marketing with Analytics Introduction Targeted marketing is a simple concept, but a key element in a marketing strategy. The goal is to identify the potential customers

More information

Dealing with missing data in practice: Methods, applications, and implications for HIV cohort studies

Dealing with missing data in practice: Methods, applications, and implications for HIV cohort studies Dealing with missing data in practice: Methods, applications, and implications for HIV cohort studies Belen Alejos Ferreras Centro Nacional de Epidemiología Instituto de Salud Carlos III 19 de Octubre

More information

A Little Stata Session 1

A Little Stata Session 1 A Little Stata Session 1 Following is a very basic introduction to Stata. I highly recommend the tutorial available at: http://www.ats.ucla.edu/stat/stata/default.htm When you bring up Stata, you will

More information

Applied Econometrics

Applied Econometrics Applied Econometrics Lecture 3 Nathaniel Higgins ERS and JHU 20 September 2010 Outline of today s lecture Schedule and Due Dates Making OLS make sense Uncorrelated X s Correlated X s Omitted variable bias

More information

Multilevel/ Mixed Effects Models: A Brief Overview

Multilevel/ Mixed Effects Models: A Brief Overview Multilevel/ Mixed Effects Models: A Brief Overview Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised March 27, 2018 These notes borrow very heavily, often/usually

More information

Interactions made easy

Interactions made easy Interactions made easy André Charlett Neville Q Verlander Health Protection Agency Centre for Infections Motivation Scientific staff within institute using Stata to fit many types of regression models

More information

(LDA lecture 4/15/08: Transition model for binary data. -- TL)

(LDA lecture 4/15/08: Transition model for binary data. -- TL) (LDA lecture 4/5/08: Transition model for binary data -- TL) (updated 4/24/2008) log: G:\public_html\courses\LDA2008\Data\CTQ2log log type: text opened on: 5 Apr 2008, 2:27:54 *** read in data ******************************************************

More information

Eco311, Final Exam, Fall 2017 Prof. Bill Even. Your Name (Please print) Directions. Each question is worth 4 points unless indicated otherwise.

Eco311, Final Exam, Fall 2017 Prof. Bill Even. Your Name (Please print) Directions. Each question is worth 4 points unless indicated otherwise. Your Name (Please print) Directions Each question is worth 4 points unless indicated otherwise. Place all answers in the space provided below or within each question. Round all numerical answers to the

More information

The SPSS Sample Problem To demonstrate these concepts, we will work the sample problem for logistic regression in SPSS Professional Statistics 7.5, pa

The SPSS Sample Problem To demonstrate these concepts, we will work the sample problem for logistic regression in SPSS Professional Statistics 7.5, pa The SPSS Sample Problem To demonstrate these concepts, we will work the sample problem for logistic regression in SPSS Professional Statistics 7.5, pages 37-64. The description of the problem can be found

More information

Timing Production Runs

Timing Production Runs Class 7 Categorical Factors with Two or More Levels 189 Timing Production Runs ProdTime.jmp An analysis has shown that the time required in minutes to complete a production run increases with the number

More information

for var trstprl trstlgl trstplc trstplt trstep: reg X trust10 stfeco yrbrn hinctnt edulvl pltcare polint wrkprty

for var trstprl trstlgl trstplc trstplt trstep: reg X trust10 stfeco yrbrn hinctnt edulvl pltcare polint wrkprty for var trstprl trstlgl trstplc trstplt trstep: reg X trust10 stfeco yrbrn hinctnt edulvl pltcare polint wrkprty -> reg trstprl trust10 stfeco yrbrn hinctnt edulvl pltcare polint wrkprty Source SS df MS

More information

R-SQUARED RESID. MEAN SQUARE (MSE) 1.885E+07 ADJUSTED R-SQUARED STANDARD ERROR OF ESTIMATE

R-SQUARED RESID. MEAN SQUARE (MSE) 1.885E+07 ADJUSTED R-SQUARED STANDARD ERROR OF ESTIMATE These are additional sample problems for the exam of 2012.APR.11. The problems have numbers 6, 7, and 8. This is not Minitab output, so you ll find a few extra challenges. 6. The following information

More information

The study obtains the following results: Homework #2 Basics of Logistic Regression Page 1. . version 13.1

The study obtains the following results: Homework #2 Basics of Logistic Regression Page 1. . version 13.1 Soc 73994, Homework #2: Basics of Logistic Regression Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 14, 2018 All answers should be typed and mailed to

More information

DAY 2 Advanced comparison of methods of measurements

DAY 2 Advanced comparison of methods of measurements EVALUATION AND COMPARISON OF METHODS OF MEASUREMENTS DAY Advanced comparison of methods of measurements Niels Trolle Andersen and Mogens Erlandsen mogens@biostat.au.dk Department of Biostatistics DAY xtmixed:

More information

F u = t n+1, t f = 1994, 2005

F u = t n+1, t f = 1994, 2005 Forecasting an Electric Utility's Emissions Using SAS/AF and SAS/STAT Software: A Linear Analysis Md. Azharul Islam, The Ohio State University, Columbus, Ohio. David Wang, The Public Utilities Commission

More information

Interpreting and Visualizing Regression models with Stata Margins and Marginsplot. Boriana Pratt May 2017

Interpreting and Visualizing Regression models with Stata Margins and Marginsplot. Boriana Pratt May 2017 Interpreting and Visualizing Regression models with Stata Margins and Marginsplot Boriana Pratt May 2017 Interpreting regression models Often regression results are presented in a table format, which makes

More information

Appendix C: Lab Guide for Stata

Appendix C: Lab Guide for Stata Appendix C: Lab Guide for Stata 2011 1. The Lab Guide is divided into sections corresponding to class lectures. Each section includes both a review, which everyone should complete and an exercise, which

More information

Working with Stata Inference on proportions

Working with Stata Inference on proportions Working with Stata Inference on proportions Nicola Orsini Biostatistics Team Department of Public Health Sciences Karolinska Institutet Outline Inference on one population proportion Principle of maximum

More information

The SAS System 1. RM-ANOVA analysis of sheep data assuming circularity 2

The SAS System 1. RM-ANOVA analysis of sheep data assuming circularity 2 The SAS System 1 Obs no2 sheep time y 1 1 1 time1 2.197 2 1 1 time2 2.442 3 1 1 time3 2.542 4 1 1 time4 2.241 5 1 1 time5 1.960 6 1 1 time6 1.988 7 1 2 time1 1.932 8 1 2 time2 2.526 9 1 2 time3 2.526 10

More information

BUS105 Statistics. Tutor Marked Assignment. Total Marks: 45; Weightage: 15%

BUS105 Statistics. Tutor Marked Assignment. Total Marks: 45; Weightage: 15% BUS105 Statistics Tutor Marked Assignment Total Marks: 45; Weightage: 15% Objectives a) Reinforcing your learning, at home and in class b) Identifying the topics that you have problems with so that your

More information

Basics of Stata language

Basics of Stata language Basics of Stata language Nicola Orsini, PhD Associate Professor of Medical Statistics Department of Public Health Sciences Karolinska Institutet 2018 Aims This course helps to get familiar with Stata language

More information

Failure to take the sampling scheme into account can lead to inaccurate point estimates and/or flawed estimates of the standard errors.

Failure to take the sampling scheme into account can lead to inaccurate point estimates and/or flawed estimates of the standard errors. Analyzing Complex Survey Data: Some key issues to be aware of Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 20, 2018 Be sure to read the Stata Manual s

More information

********************************************************************************************** *******************************

********************************************************************************************** ******************************* 1 /* Workshop of impact evaluation MEASURE Evaluation-INSP, 2015*/ ********************************************************************************************** ******************************* DEMO: Propensity

More information

SUGGESTED SOLUTIONS Winter Problem Set #1: The results are attached below.

SUGGESTED SOLUTIONS Winter Problem Set #1: The results are attached below. 450-2 Winter 2008 Problem Set #1: SUGGESTED SOLUTIONS The results are attached below. 1. The balanced panel contains larger firms (sales 120-130% bigger than the full sample on average), which are more

More information

ECON Introductory Econometrics Seminar 9

ECON Introductory Econometrics Seminar 9 ECON4150 - Introductory Econometrics Seminar 9 Stock and Watson EE13.1 May 4, 2015 Stock and Watson EE13.1 ECON4150 - Introductory Econometrics Seminar 9 May 4, 2015 1 / 18 Empirical exercise E13.1: Data

More information

ECON Introductory Econometrics Seminar 6

ECON Introductory Econometrics Seminar 6 ECON4150 - Introductory Econometrics Seminar 6 Stock and Watson EE10.1 April 28, 2015 Stock and Watson EE10.1 ECON4150 - Introductory Econometrics Seminar 6 April 28, 2015 1 / 21 Guns data set Some U.S.

More information

Problem Points Score USE YOUR TIME WISELY SHOW YOUR WORK TO RECEIVE PARTIAL CREDIT

Problem Points Score USE YOUR TIME WISELY SHOW YOUR WORK TO RECEIVE PARTIAL CREDIT STAT 512 EXAM I STAT 512 Name (7 pts) Problem Points Score 1 40 2 25 3 28 USE YOUR TIME WISELY SHOW YOUR WORK TO RECEIVE PARTIAL CREDIT WRITE LEGIBLY. ANYTHING UNREADABLE WILL NOT BE GRADED GOOD LUCK!!!!

More information

This chapter will present the research result based on the analysis performed on the

This chapter will present the research result based on the analysis performed on the CHAPTER 4 : RESEARCH RESULT 4.0 INTRODUCTION This chapter will present the research result based on the analysis performed on the data. Some demographic information is presented, following a data cleaning

More information

Psych 5741/5751: Data Analysis University of Boulder Gary McClelland & Charles Judd

Psych 5741/5751: Data Analysis University of Boulder Gary McClelland & Charles Judd Second Mid-Term Exam Multiple Regression Question A: Public policy analysts are interested in understanding how and why individuals come to develop the opinions they do of various public policy issues.

More information

energy usage summary (both house designs) Friday, June 15, :51:26 PM 1

energy usage summary (both house designs) Friday, June 15, :51:26 PM 1 energy usage summary (both house designs) Friday, June 15, 18 02:51:26 PM 1 The UNIVARIATE Procedure type = Basic Statistical Measures Location Variability Mean 13.87143 Std Deviation 2.36364 Median 13.70000

More information

Annexe 1 : statistiques descriptives

Annexe 1 : statistiques descriptives Annexe 1 : statistiques descriptives The MEANS Procedure age 532 36.8533835 11.7263657 18.0000000 64.0000000 lnwage 532 2.0597883 0.5156435 0.5596000 3.2692000 ED 532 13.0187970 2.6195743 2.0000000 18.0000000

More information