Unit 5 Logistic Regression Practice Problems

Size: px
Start display at page:

Download "Unit 5 Logistic Regression Practice Problems"

Transcription

1 Unit 5 Logistic Regression Practice Problems SOLUTIONS R Users Source: Afifi A., Clark VA and May S. Computer Aided Multivariate Analysis, Fourth Edition. Boca Raton: Chapman and Hall, Exercises #1-#3 utilize a data set provided by Afifi, Clark and May (2004). The data are a study of depression and was a longitudinal study. The purpose of the study was to obtain estimates of the prevalence and incidence of depression and to explore its risk factors. The study variables were of several types demographics, life events, stressors, physical health, health services utilization, medication use, lifestyle, and social support. Before You Begin Download R data sets depress.rdata and illeetvilaine.rdata from the course website page. R Preliminary Attach packages Tips (1) (ONE TIME): Be sure that you have installed these packages (Do this in the console window) (2) Include these library( ) commands in your markdown file # Attach packages needed library(foreign) library(gmodels) library(desctools) library(mosaic) library(lmtest) library(resourceselection) library(generalhoslem) library(epir) library(proc) # Used to import stata data using command read.dta() # Used to produce xtab using command CrossTable # Used to obtain OR for 2x2 table using command OddsRatio # Used for some xtab usingcommand tally # Used for LR tests using command lrtest() # Use for Test of GOF using command hoslem.test() # Use for Test of GOF using command logitgof() # Use for classification table using command epi.tests() # Use for ROC curve using commands roc() and plot.roc() Exercises #1-3 utilize the data set depress.rdata Consider the following three variables. Variable Codings Label drink 1 = yes 2 = no Regular Drinker sex 1 = male 2 = female cases 0 = Normal 1 = Case of Depression Depressed is cesd > 16.sol_logistic R Users.docx Page 1 of 14

2 1. Source: Afifi A., Clark VA and May S. Computer Aided Multivariate Analysis, Fourth Edition. Boca Raton: Chapman and Hall, 2004, Problem 12.9, page 330. Complete the following table by supplying the cell frequencies. Sex Regular Drinker Male Female Total Yes No Total R Solution # Input data depress.rdata from desktop setwd("/users/cbigelow/desktop/") load(file= depress.rdata ) # Preliminary - Attach labels to values of sex and drinkk depress$sex <- factor(depress$sex, levels=c(1,2), labels=c("1=male", "2=Female")) depress$drink <- factor(depress$drink, levels=c(1,2), labels=c("1=yes", "2=No")) # Crosstabulation row=drink, column=sex, display counts only CrossTable(depress$drink,depress$sex,dnn=c("Regular Drinker", "Sex"),format="SAS",prop.r=FALSE,pro p.c=false,prop.t=false,prop.chisq=false,chisq=false,fisher=false) Cell Contents N Total Observations in Table: 294 Sex Regular Drinker 1=Male 2=Female Row Total 1=Yes =No Column Total OddsRatio(depress$drink,depress$sex) ## [1] sol_logistic R Users.docx Page 2 of 14

3 What are the odds that a man is a regular drinker? 95 / 16 = What are the odds that a woman is a regular drinker? 139 / 44 = What is the odds ratio? That is, what is the odds that a man, relative to a woman, is a regular drinker? OR = [odds for man] / [odds for woman] = /3.159 = Repeat the tabulation that you produced for problem #1 two times, one for persons who are depressed and the other for persons who are not depressed. R - Solution # PERSONS WHO ARE DEPRESSED # Crosstabulation row=drink, column=sex, display counts only # Odds Ratio subset_depressed <- subset(depress, cases==1) CrossTable(subset_depressed$drink,subset_depressed$sex,dnn=c("Regular Drinker", "Sex"),format="SAS ",prop.r=false,prop.c=false,prop.t=false,prop.chisq=false,chisq=false,fisher=false) Cell Contents N Total Observations in Table: 50 Sex Regular Drinker 1=Male 2=Female Row Total 1=Yes =No Column Total OddsRatio(subset_depressed$drink,subset_depressed$sex) [1] OR = [odds for man] / [odds for woman] = (8/2)/(33/7) = sol_logistic R Users.docx Page 3 of 14

4 # PERSONS WHO ARE NOT DEPRESSED subset_normal <- subset(depress, cases==0) CrossTable(subset_normal$drink,subset_normal$sex,dnn=c("Regular Drinker", "Sex"),format="SAS",prop.r=FALSE,prop.c=FALSE,prop.t=FALSE,prop.chisq=FALSE,chisq=FALSE,fisher=FALSE) Cell Contents N Total Observations in Table: 244 Sex Regular Drinker 1=Male 2=Female Row Total 1=Yes =No Column Total OddsRatio(subset_normal$drink,subset_normal$sex) [1] OR = [odds for man] / [odds for woman] = (87/14)/(106/37) = sol_logistic R Users.docx Page 4 of 14

5 3. Fit a logistic regression model using these variables. Use DRINK as the dependent variable and CASES and FEMALE SEX as independent variables. Also include as an independent variable the appropriate interaction term. Is the interaction term in your model significant? R Solution # Create 0/1 indicators of regular drinker (drink01) and female gender (female01) # Create interaction of drinker and female gender # KEY to following command: when drink=1 then drink01=1, otherwise drink01=0 depress$drink01 <- ifelse(as.numeric(depress$drink)==1,1,0) tally(drink~drink01,data=depress) drink01 drink 0 1 1=Yes =No 60 0 # KEY to following command: when sex=2 then female01=1, otherwise female01=0 depress$female01 <- ifelse(as.numeric(depress$sex)==2,1,0) tally(sex~female01,data=depress) female01 sex 0 1 1=Male =Female # Interaction fem_case = (female01)*(cases) depress$fem_case <- depress$female01*depress$cases # Fit logistic regression model: Y=drink01 X1=, X2=female01, X3=interaction # glm(yvariable ~ X1 + X Xp, data=dataframename, family=binomial) model_q3 <- glm(drink01 ~ cases + female01 + fem_case, data=depress, family=binomial) summary(model_q3) Call: glm(formula = drink01 ~ cases + female01 + fem_case, family = binomial, data = depress) Deviance Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) e- 10 *** cases female * fem_case Wald Statistic p- value Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1.sol_logistic R Users.docx Page 5 of 14

6 (Dispersion parameter for binomial family taken to be 1) Null deviance: on 293 degrees of freedom Residual deviance: on 290 degrees of freedom AIC: Number of Fisher Scoring iterations: 4 # Odds Ratios % 95% CI exp(cbind(or=coef(model_q3), confint(model_q3))) OR 2.5 % 97.5 % (Intercept) cases female fem_case # LR Test of Interaction (Null: beta for interaction=0) # Illustration in some detail # Fit reduced model, fit full model, perform LR test reduced <- glm(drink01 ~ cases + female01, data=depress, family=binomial) full <- glm(drink01 ~ cases + female01 + fem_case, data=depress, family=binomial) lrtest(reduced,full) Likelihood ratio test Model 1: drink01 ~ cases + female01 Model 2: drink01 ~ cases + female01 + fem_case #Df LogLik Df Chisq Pr(>Chisq) In this sample, there is no statistically significant evidence that the odds regular drinking is associated with an interaction of gender and case of depression (LR test, df=1, p-value =.3493). This is close to the Wald statistic p-value =.327 that can be seen in the coefficients table. Fitted Model: logit [ pr (drinker=yes) ] = *cases *female *fem_case where cases =1 if depressed; 0 otherwise female01 = 1 if female; 0 otherwise fem_case = (cases) * (female01) Is the interaction term in your model significant? No. ˆβ3 = SÊ( ˆβ 3 ) = 0.96 and p-value =.35.sol_logistic R Users.docx Page 6 of 14

7 4. Source: Kleinbaum, Kupper, Miller, and Nizam. Applied Regression Analysis and Other Multivariable Methods, Third Edition. Pacific Grove: Duxbury Press, p 683 (problem 2). A five year follow-up study on 600 disease free subjects was carried out to assess the effect of 0/1 exposure E on the development (or not) of a certain disease. The variables AGE (continuous) and obesity status (OBS), the latter a 0/1 variable were determined at the start of the follow-up and were to be considered as control variables in analyzing the data. (a) State the logit form of a logistic regression model that assesses the effect of the 0/1 exposure variable E controlling for the confounding effects of AGE and OBS and the interaction effects of AGE with E and OBS with E. Solution: logit[π] = β 0 + β 1*E + β 2*AGE + β 3*OBS + β*agee 4 + β*obse 5 I used the following notation: π = Probability [ disease ] AGEE = AGE * E. This is a created variable that is the interaction of AGE with E OBSE = OBS * E Similarly, this is the interaction of OBS with E. logit[π] = β 0 + β 1*E + β 2*AGE + β 3*OBS + β*agee 4 + β*obse 5 (b) Given the model you have for #4a, give a formula for the odds ratio for the exposure-disease relationship that controls for the confounding and interactive effects of AGE and OBS. Solution: The solution here follows the ideas on pp 9-11 in Lecture Notes 5, Logistic Regression. Value of Predictor for Person who is Predictor Exposed Not Exposed E 1 0 AGE AGE 1 AGE 0 OBS OBS 1 OBS 0 AGEE AGE 1 0 OBSE OBS 1 0.sol_logistic R Users.docx Page 7 of 14

8 Then OR = exp { logit[π for exposed person] - logit[π for NON exposed person] } = exp { [ β + β + β*age + β*obs + β*age + β*obs] [ β + β*age + β*obs] } = exp { β 1 + β 2*(AGE1-AGE o) + β 3*(OBS 1 - OBS 0) + β 4*AGE 1 + β 5*OBS 1 } (c) Now use the formula that you have for #4b to write an expression for the estimated odds ratio for the exposure-disease relationship that considers both confounding and interaction when AGE=40 and OBS=1. Solution: OR ˆ = exp { β + (40)β + β } Value of Predictor for Person who is Predictor Exposed Not Exposed E 1 0 AGE OBS 1 1 AGEE 40 0 OBSE 1 0 OR = exp { β 1 + β 2*(40-40) + β 3*(1-1) + β 4*40 + β 5*1 } = exp { β 1 + β 4*40 + β 5*1 }.sol_logistic R Users.docx Page 8 of 14

9 Exercises #5-9 utilize the data set illeetvilaine.rdata Consider the following three variables. Variable Codings Label in STATA case 1 = yes 0= no Case status agegp 1=25-34 Age, grouped 2= = = = =75+ tobgrp 1=0-9 g/day 2= = =30+ Tobacco use, grouped 5. Understanding the Global Test of the Fitted Model: In this exercise, you will see that the global chi square test of the current model is equivalent to a LR Ratio test that compares the reduced model containing the intercept only versus the full model that contains the current model. In developing your answer, include as predictors in your full model indicator variables for agegp and tobgp. Tip How to Fit the Intercept Only Model. R Users Fit the dependent variable to the constant 1. R Solution # Input illeetvillaine.rdata from desktop setwd("/users/cbigelow/desktop/") load(file= illeetvilaine.rdata ) ille <- illeetvilaine # Create indicators for agegp (REFERENT is age 25-34) ille$age_3544 <- ifelse(as.numeric(ille$agegp)==2,1,0) ille$age_4554 <- ifelse(as.numeric(ille$agegp)==3,1,0) ille$age_5564 <- ifelse(as.numeric(ille$agegp)==4,1,0) ille$age_6574 <- ifelse(as.numeric(ille$agegp)==5,1,0) ille$age_75p <- ifelse(as.numeric(ille$agegp)==6,1,0).sol_logistic R Users.docx Page 9 of 14

10 # Create indicators for tobgrp (REFERENT is tob 0-9) ille$tob_1019 <- ifelse(as.numeric(ille$tobgp)==2,1,0) ille$tob_2029 <- ifelse(as.numeric(ille$tobgp)==3,1,0) ille$tob_30p <- ifelse(as.numeric(ille$tobgp)==4,1,0) Dear class I followed these indicator variable creations with some cross- tabulations to check that my coding was correct (See page 5 for example using the command tally( ). Output of these checks is not shown. # Fit reduced model, fit full model, perform LR test reduced <- glm(case ~ 1, data=ille, family=binomial) full <- glm(case ~ age_ age_ age_ age_ age_75p + tob_ tob_ tob _30p, data=ille,family=binomial) lrtest(reduced,full) Likelihood ratio test Model 1: case ~ 1 Model 2: case ~ age_ age_ age_ age_ age_75p + tob_ tob_ tob_30p #Df LogLik Df Chisq Pr(>Chisq) < 2.2e- 16 *** Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 # By hand calculation using difference in values of deviance byhand_1 <- reduced$deviance - full$deviance byhand_1 [1] pchisq(byhand_1, 8, lower.tail=false) [1] e- 30 # By hand calculation using difference in values of - 2 log Likelihood byhand_2 <- - 2*logLik(reduced)[1] - (- 2*logLik(full)[1]) byhand_2 [1] pchisq(byhand_2,8,lower.tail=false) [1] e- 30.sol_logistic R Users.docx Page 10 of 14

11 6. Illustration of Hosmer-Lemeshow Goodness of Fit Test (NULL: model is a good fit) See also unit 5 notes, pp For this illustration, fit the model containing design variables for age group and tobacco use. Then perform the Hosmer-Lemeshow goodness of fit test. R Solution # Hosmer- Lemeshow GOF (Null:model is good fit) # Using command hoslem.test() in package ResourceSelection # hoslem.test(nameofmodel$y, fitted(name OF MODEL), g=numberofbins) hoslem.test(full$y,fitted(full), g=8) Hosmer and Lemeshow goodness of fit (GOF) test data: full$y, fitted(full) X- squared = , df = 6, p- value = # Using command logitgof() in package generalhoslem logitgof(ille$case,fitted(full),g=8,ord=false) Hosmer and Lemeshow test (binary model) data: ille$case, fitted(full) X- squared = , df = 6, p- value = sol_logistic R Users.docx Page 11 of 14

12 7. Illustration of Link Test (NULL: current model is adequate; no additional predictors needed) See also unit 5 notes, pp For the current model, perform the link test for omitted variables. R Solution # R solution requires a bit of programming # Step 1: Obtain fitted values. Name what you like (eg - hat) hat <- predict(full) # Step 2: Obtain (fitted values)- squared. Name what you like (eg - hatsq) hatsq <- hat^2 # Step 3: Fit model to fitted and fitted- squared. Test Null: Beta for fitted squared=0 linktest <- summary(glm(case ~ hat + hatsq, data=ille, family=binomial)) linktest Call: glm(formula = case ~ hat + hatsq, family = binomial, data = ille) Deviance Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) hat e- 07 *** hatsq Nice. We have no statistically significant evidence of model inadequacy (Null: beta(hatsq)=0,p- value =.657).sol_logistic R Users.docx Page 12 of 14

13 8. Illustration of Classification Table See also unit 5 notes, pp For the current model, obtain the classification table R Solution # R solution requires a bit of programming here, too. # Fit model. full <- glm(case ~ age_ age_ age_ age_ age_75p + tob_ tob_ tob _30p, data=ille,family=binomial) # Save fitted probabilities (y_fitted) y_fitted=fitted(full) # Save predicted 0/1 events using cut- off of 0.50 (pred_50) pred_50 <- ifelse(y_fitted >= 0.50, 1, 0) # Detailed xtab using command CrossTable (package gmodels) classify <- as.data.frame(cbind(pred_50, case=ille$case)) CrossTable(classify$pred_50,classify$case,dnn=c("Predicted (cut=.50)", "Observed"),format="SAS",pr op.r=false,prop.c=false,prop.t=false,prop.chisq=false,chisq=false,fisher=false) Cell Contents N Total Observations in Table: 975 Observed Predicted (cut=.50) 0 1 Row Total Column Total # Detailed epi statistics using command epi.tests (package epir) # Must recode 1=event/0=NONevent to 1=event/2=NONevent # And must create table for use with epi.tests classify$test <- ifelse((classify$pred_50)==0,2,1) classify$disease <- ifelse((classify$case)==0,2,1) class_table <- table(classify$test, classify$disease).sol_logistic R Users.docx Page 13 of 14

14 epi.tests(class_table) Outcome + Outcome - Total Test Test Total Point estimates and 95 % CIs: Apparent prevalence 0.03 (0.02, 0.04) True prevalence 0.21 (0.18, 0.23) Sensitivity 0.10 (0.06, 0.15) Specificity 0.99 (0.98, 0.99) Positive predictive value 0.67 (0.47, 0.83) Negative predictive value 0.81 (0.78, 0.83) Positive likelihood ratio 7.75 (3.69, 16.29) Negative likelihood ratio 0.91 (0.87, 0.96) Illustration of ROC Curve See also unit 5 notes, pp For the current model, produce the ROC curve. R Solution # roc1 <- roc(dataframe$yvariable, fitted(modelname)) # plot.roc(roc1, print.auc=true, legacy.axes=true) roc1 <- roc(ille$case,fitted(full)) plot.roc(roc1,main="ille- et- Vilaine", print.auc=true,legacy.axes=true).sol_logistic R Users.docx Page 14 of 14

Table of Contents. Logistic Regression- Illustration Carol Bigelow March 21, 2017

Table of Contents. Logistic Regression- Illustration Carol Bigelow March 21, 2017 Logistic Regression- Illustration Carol Bigelow March 21, 2017 Table of Contents Preliminary - Attach packages needed using command library( )... 2 Must have installed packages in console window first...

More information

Statistical Modelling with Stata: Binary Outcomes

Statistical Modelling with Stata: Binary Outcomes Statistical Modelling with Stata: Binary Outcomes Mark Lunt Arthritis Research UK Epidemiology Unit University of Manchester 21/11/2017 Cross-tabulation Exposed Unexposed Total Cases a b a + b Controls

More information

Generalized linear models for binary data. A better graphical exploratory data analysis. The simple linear logistic regression model

Generalized linear models for binary data. A better graphical exploratory data analysis. The simple linear logistic regression model Stat 3302 (Spring 2017) Peter F. Craigmile Simple linear logistic regression (part 1) [Dobson and Barnett, 2008, Sections 7.1 7.3] Generalized linear models for binary data Beetles dose-response example

More information

Homework Solutions Applied Logistic Regression

Homework Solutions Applied Logistic Regression Homework Solutions Applied Logistic Regression WEEK 6 Exercise 1 From the ICU data, use as the outcome variable vital status (STA) and CPR prior to ICU admission (CPR) as a covariate. (a) Demonstrate that

More information

Section IX. Introduction to Logistic Regression for binary outcomes. Poisson regression

Section IX. Introduction to Logistic Regression for binary outcomes. Poisson regression Section IX Introduction to Logistic Regression for binary outcomes Poisson regression 0 Sec 9 - Logistic regression In linear regression, we studied models where Y is a continuous variable. What about

More information

Unit 5 Logistic Regression

Unit 5 Logistic Regression BIOSTATS 640 - Spring 2018 5. Logistic Regression Page 1 of 66 Unit 5 Logistic Regression To all the ladies present and some of those absent - Jerzy Neyman What behaviors influence the chances of developing

More information

Unit 5 Logistic Regression

Unit 5 Logistic Regression BIOSTATS 640 - Spring 2017 5. Logistic Regression Page 1 of 65 Unit 5 Logistic Regression To all the ladies present and some of those absent - Jerzy Neyman What behaviors influence the chances of developing

More information

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F). STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) (b) (c) (d) (e) In 2 2 tables, statistical independence is equivalent

More information

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).

STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F). STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) T In 2 2 tables, statistical independence is equivalent to a population

More information

Interactions in Logistic Regression

Interactions in Logistic Regression Interactions in Logistic Regression > # UCBAdmissions is a 3-D table: Gender by Dept by Admit > # Same data in another format: > # One col for Yes counts, another for No counts. > Berkeley = read.table("http://www.utstat.toronto.edu/~brunner/312f12/

More information

7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis

7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis Lecture 6: Logistic Regression Analysis Christopher S. Hollenbeak, PhD Jane R. Schubart, PhD The Outcomes Research Toolbox Review Homework 2 Overview Logistic regression model conceptually Logistic regression

More information

Linear Regression Models P8111

Linear Regression Models P8111 Linear Regression Models P8111 Lecture 25 Jeff Goldsmith April 26, 2016 1 of 37 Today s Lecture Logistic regression / GLMs Model framework Interpretation Estimation 2 of 37 Linear regression Course started

More information

Logistic Regressions. Stat 430

Logistic Regressions. Stat 430 Logistic Regressions Stat 430 Final Project Final Project is, again, team based You will decide on a project - only constraint is: you are supposed to use techniques for a solution that are related to

More information

Unit 5 Logistic Regression

Unit 5 Logistic Regression PubHlth 640 - Spring 2014 5. Logistic Regression Page 1 of 63 Unit 5 Logistic Regression To all the ladies present and some of those absent - Jerzy Neyman What behaviors influence the chances of developing

More information

Lecture 14: Introduction to Poisson Regression

Lecture 14: Introduction to Poisson Regression Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu 8 May 2007 1 / 52 Overview Modelling counts Contingency tables Poisson regression models 2 / 52 Modelling counts I Why

More information

Modelling counts. Lecture 14: Introduction to Poisson Regression. Overview

Modelling counts. Lecture 14: Introduction to Poisson Regression. Overview Modelling counts I Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu Why count data? Number of traffic accidents per day Mortality counts in a given neighborhood, per week

More information

Logistic Regression - problem 6.14

Logistic Regression - problem 6.14 Logistic Regression - problem 6.14 Let x 1, x 2,, x m be given values of an input variable x and let Y 1,, Y m be independent binomial random variables whose distributions depend on the corresponding values

More information

R Hints for Chapter 10

R Hints for Chapter 10 R Hints for Chapter 10 The multiple logistic regression model assumes that the success probability p for a binomial random variable depends on independent variables or design variables x 1, x 2,, x k.

More information

Analysis of Categorical Data. Nick Jackson University of Southern California Department of Psychology 10/11/2013

Analysis of Categorical Data. Nick Jackson University of Southern California Department of Psychology 10/11/2013 Analysis of Categorical Data Nick Jackson University of Southern California Department of Psychology 10/11/2013 1 Overview Data Types Contingency Tables Logit Models Binomial Ordinal Nominal 2 Things not

More information

Logistic Regression. Interpretation of linear regression. Other types of outcomes. 0-1 response variable: Wound infection. Usual linear regression

Logistic Regression. Interpretation of linear regression. Other types of outcomes. 0-1 response variable: Wound infection. Usual linear regression Logistic Regression Usual linear regression (repetition) y i = b 0 + b 1 x 1i + b 2 x 2i + e i, e i N(0,σ 2 ) or: y i N(b 0 + b 1 x 1i + b 2 x 2i,σ 2 ) Example (DGA, p. 336): E(PEmax) = 47.355 + 1.024

More information

Lecture 12: Effect modification, and confounding in logistic regression

Lecture 12: Effect modification, and confounding in logistic regression Lecture 12: Effect modification, and confounding in logistic regression Ani Manichaikul amanicha@jhsph.edu 4 May 2007 Today Categorical predictor create dummy variables just like for linear regression

More information

STA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3

STA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3 STA 303 H1S / 1002 HS Winter 2011 Test March 7, 2011 LAST NAME: FIRST NAME: STUDENT NUMBER: ENROLLED IN: (circle one) STA 303 STA 1002 INSTRUCTIONS: Time: 90 minutes Aids allowed: calculator. Some formulae

More information

Introduction to logistic regression

Introduction to logistic regression Introduction to logistic regression Tuan V. Nguyen Professor and NHMRC Senior Research Fellow Garvan Institute of Medical Research University of New South Wales Sydney, Australia What we are going to learn

More information

Class Notes: Week 8. Probit versus Logit Link Functions and Count Data

Class Notes: Week 8. Probit versus Logit Link Functions and Count Data Ronald Heck Class Notes: Week 8 1 Class Notes: Week 8 Probit versus Logit Link Functions and Count Data This week we ll take up a couple of issues. The first is working with a probit link function. While

More information

ECLT 5810 Linear Regression and Logistic Regression for Classification. Prof. Wai Lam

ECLT 5810 Linear Regression and Logistic Regression for Classification. Prof. Wai Lam ECLT 5810 Linear Regression and Logistic Regression for Classification Prof. Wai Lam Linear Regression Models Least Squares Input vectors is an attribute / feature / predictor (independent variable) The

More information

9 Generalized Linear Models

9 Generalized Linear Models 9 Generalized Linear Models The Generalized Linear Model (GLM) is a model which has been built to include a wide range of different models you already know, e.g. ANOVA and multiple linear regression models

More information

Age 55 (x = 1) Age < 55 (x = 0)

Age 55 (x = 1) Age < 55 (x = 0) Logistic Regression with a Single Dichotomous Predictor EXAMPLE: Consider the data in the file CHDcsv Instead of examining the relationship between the continuous variable age and the presence or absence

More information

Classification. Chapter Introduction. 6.2 The Bayes classifier

Classification. Chapter Introduction. 6.2 The Bayes classifier Chapter 6 Classification 6.1 Introduction Often encountered in applications is the situation where the response variable Y takes values in a finite set of labels. For example, the response Y could encode

More information

Regression Methods for Survey Data

Regression Methods for Survey Data Regression Methods for Survey Data Professor Ron Fricker! Naval Postgraduate School! Monterey, California! 3/26/13 Reading:! Lohr chapter 11! 1 Goals for this Lecture! Linear regression! Review of linear

More information

Logistic Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University

Logistic Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University Logistic Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) Logistic Regression 1 / 38 Logistic Regression 1 Introduction

More information

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION. ST3241 Categorical Data Analysis. (Semester II: ) April/May, 2011 Time Allowed : 2 Hours

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION. ST3241 Categorical Data Analysis. (Semester II: ) April/May, 2011 Time Allowed : 2 Hours NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3 4 5 6 Full marks

More information

BIOSTATS Intermediate Biostatistics Spring 2017 Exam 2 (Units 3, 4 & 5) Practice Problems SOLUTIONS

BIOSTATS Intermediate Biostatistics Spring 2017 Exam 2 (Units 3, 4 & 5) Practice Problems SOLUTIONS BIOSTATS 640 - Intermediate Biostatistics Spring 2017 Exam 2 (Units 3, 4 & 5) Practice Problems SOLUTIONS Practice Question 1 Both the Binomial and Poisson distributions have been used to model the quantal

More information

STA102 Class Notes Chapter Logistic Regression

STA102 Class Notes Chapter Logistic Regression STA0 Class Notes Chapter 0 0. Logistic Regression We continue to study the relationship between a response variable and one or more eplanatory variables. For SLR and MLR (Chapters 8 and 9), our response

More information

Analysing categorical data using logit models

Analysing categorical data using logit models Analysing categorical data using logit models Graeme Hutcheson, University of Manchester The lecture notes, exercises and data sets associated with this course are available for download from: www.research-training.net/manchester

More information

Generalized linear models

Generalized linear models Generalized linear models Douglas Bates November 01, 2010 Contents 1 Definition 1 2 Links 2 3 Estimating parameters 5 4 Example 6 5 Model building 8 6 Conclusions 8 7 Summary 9 1 Generalized Linear Models

More information

Correlation and regression

Correlation and regression 1 Correlation and regression Yongjua Laosiritaworn Introductory on Field Epidemiology 6 July 2015, Thailand Data 2 Illustrative data (Doll, 1955) 3 Scatter plot 4 Doll, 1955 5 6 Correlation coefficient,

More information

PubHlth Intermediate Biostatistics Spring 2015 Exam 2 (Units 3, 4 & 5) Study Guide

PubHlth Intermediate Biostatistics Spring 2015 Exam 2 (Units 3, 4 & 5) Study Guide PubHlth 640 - Intermediate Biostatistics Spring 2015 Exam 2 (Units 3, 4 & 5) Study Guide Unit 3 (Discrete Distributions) Take care to know how to do the following! Learning Objective See: 1. Write down

More information

Regression so far... Lecture 21 - Logistic Regression. Odds. Recap of what you should know how to do... At this point we have covered: Sta102 / BME102

Regression so far... Lecture 21 - Logistic Regression. Odds. Recap of what you should know how to do... At this point we have covered: Sta102 / BME102 Background Regression so far... Lecture 21 - Sta102 / BME102 Colin Rundel November 18, 2014 At this point we have covered: Simple linear regression Relationship between numerical response and a numerical

More information

BMI 541/699 Lecture 22

BMI 541/699 Lecture 22 BMI 541/699 Lecture 22 Where we are: 1. Introduction and Experimental Design 2. Exploratory Data Analysis 3. Probability 4. T-based methods for continous variables 5. Power and sample size for t-based

More information

Logistic Regression 21/05

Logistic Regression 21/05 Logistic Regression 21/05 Recall that we are trying to solve a classification problem in which features x i can be continuous or discrete (coded as 0/1) and the response y is discrete (0/1). Logistic regression

More information

Modelling Binary Outcomes 21/11/2017

Modelling Binary Outcomes 21/11/2017 Modelling Binary Outcomes 21/11/2017 Contents 1 Modelling Binary Outcomes 5 1.1 Cross-tabulation.................................... 5 1.1.1 Measures of Effect............................... 6 1.1.2 Limitations

More information

Introduction to the Analysis of Tabular Data

Introduction to the Analysis of Tabular Data Introduction to the Analysis of Tabular Data Anthropological Sciences 192/292 Data Analysis in the Anthropological Sciences James Holland Jones & Ian G. Robertson March 15, 2006 1 Tabular Data Is there

More information

ssh tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm

ssh tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm Kedem, STAT 430 SAS Examples: Logistic Regression ==================================== ssh abc@glue.umd.edu, tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm a. Logistic regression.

More information

Log-linear Models for Contingency Tables

Log-linear Models for Contingency Tables Log-linear Models for Contingency Tables Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Log-linear Models for Two-way Contingency Tables Example: Business Administration Majors and Gender A

More information

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator

UNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS Duration - 3 hours Aids Allowed: Calculator LAST NAME: FIRST NAME: STUDENT NUMBER: There are 27 pages

More information

ST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses

ST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses ST3241 Categorical Data Analysis I Multicategory Logit Models Logit Models For Nominal Responses 1 Models For Nominal Responses Y is nominal with J categories. Let {π 1,, π J } denote the response probabilities

More information

Truck prices - linear model? Truck prices - log transform of the response variable. Interpreting models with log transformation

Truck prices - linear model? Truck prices - log transform of the response variable. Interpreting models with log transformation Background Regression so far... Lecture 23 - Sta 111 Colin Rundel June 17, 2014 At this point we have covered: Simple linear regression Relationship between numerical response and a numerical or categorical

More information

Generalised linear models. Response variable can take a number of different formats

Generalised linear models. Response variable can take a number of different formats Generalised linear models Response variable can take a number of different formats Structure Limitations of linear models and GLM theory GLM for count data GLM for presence \ absence data GLM for proportion

More information

Case-control studies

Case-control studies Matched and nested case-control studies Bendix Carstensen Steno Diabetes Center, Gentofte, Denmark b@bxc.dk http://bendixcarstensen.com Department of Biostatistics, University of Copenhagen, 8 November

More information

Experimental Design and Statistical Methods. Workshop LOGISTIC REGRESSION. Jesús Piedrafita Arilla.

Experimental Design and Statistical Methods. Workshop LOGISTIC REGRESSION. Jesús Piedrafita Arilla. Experimental Design and Statistical Methods Workshop LOGISTIC REGRESSION Jesús Piedrafita Arilla jesus.piedrafita@uab.cat Departament de Ciència Animal i dels Aliments Items Logistic regression model Logit

More information

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: )

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: ) NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3

More information

UNIVERSITY OF TORONTO Faculty of Arts and Science

UNIVERSITY OF TORONTO Faculty of Arts and Science UNIVERSITY OF TORONTO Faculty of Arts and Science December 2013 Final Examination STA442H1F/2101HF Methods of Applied Statistics Jerry Brunner Duration - 3 hours Aids: Calculator Model(s): Any calculator

More information

Sociology 362 Data Exercise 6 Logistic Regression 2

Sociology 362 Data Exercise 6 Logistic Regression 2 Sociology 362 Data Exercise 6 Logistic Regression 2 The questions below refer to the data and output beginning on the next page. Although the raw data are given there, you do not have to do any Stata runs

More information

Description Syntax for predict Menu for predict Options for predict Remarks and examples Methods and formulas References Also see

Description Syntax for predict Menu for predict Options for predict Remarks and examples Methods and formulas References Also see Title stata.com logistic postestimation Postestimation tools for logistic Description Syntax for predict Menu for predict Options for predict Remarks and examples Methods and formulas References Also see

More information

Duration of Unemployment - Analysis of Deviance Table for Nested Models

Duration of Unemployment - Analysis of Deviance Table for Nested Models Duration of Unemployment - Analysis of Deviance Table for Nested Models February 8, 2012 The data unemployment is included as a contingency table. The response is the duration of unemployment, gender and

More information

ECLT 5810 Linear Regression and Logistic Regression for Classification. Prof. Wai Lam

ECLT 5810 Linear Regression and Logistic Regression for Classification. Prof. Wai Lam ECLT 5810 Linear Regression and Logistic Regression for Classification Prof. Wai Lam Linear Regression Models Least Squares Input vectors is an attribute / feature / predictor (independent variable) The

More information

Exercise 5.4 Solution

Exercise 5.4 Solution Exercise 5.4 Solution Niels Richard Hansen University of Copenhagen May 7, 2010 1 5.4(a) > leukemia

More information

Statistical Methods III Statistics 212. Problem Set 2 - Answer Key

Statistical Methods III Statistics 212. Problem Set 2 - Answer Key Statistical Methods III Statistics 212 Problem Set 2 - Answer Key 1. (Analysis to be turned in and discussed on Tuesday, April 24th) The data for this problem are taken from long-term followup of 1423

More information

MODULE 6 LOGISTIC REGRESSION. Module Objectives:

MODULE 6 LOGISTIC REGRESSION. Module Objectives: MODULE 6 LOGISTIC REGRESSION Module Objectives: 1. 147 6.1. LOGIT TRANSFORMATION MODULE 6. LOGISTIC REGRESSION Logistic regression models are used when a researcher is investigating the relationship between

More information

STAC51: Categorical data Analysis

STAC51: Categorical data Analysis STAC51: Categorical data Analysis Mahinda Samarakoon April 6, 2016 Mahinda Samarakoon STAC51: Categorical data Analysis 1 / 25 Table of contents 1 Building and applying logistic regression models (Chap

More information

Multinomial Logistic Regression Models

Multinomial Logistic Regression Models Stat 544, Lecture 19 1 Multinomial Logistic Regression Models Polytomous responses. Logistic regression can be extended to handle responses that are polytomous, i.e. taking r>2 categories. (Note: The word

More information

A Handbook of Statistical Analyses Using R. Brian S. Everitt and Torsten Hothorn

A Handbook of Statistical Analyses Using R. Brian S. Everitt and Torsten Hothorn A Handbook of Statistical Analyses Using R Brian S. Everitt and Torsten Hothorn CHAPTER 6 Logistic Regression and Generalised Linear Models: Blood Screening, Women s Role in Society, and Colonic Polyps

More information

11 November 2011 Department of Biostatistics, University of Copengen. 9:15 10:00 Recap of case-control studies. Frequency-matched studies.

11 November 2011 Department of Biostatistics, University of Copengen. 9:15 10:00 Recap of case-control studies. Frequency-matched studies. Matched and nested case-control studies Bendix Carstensen Steno Diabetes Center, Gentofte, Denmark http://staff.pubhealth.ku.dk/~bxc/ Department of Biostatistics, University of Copengen 11 November 2011

More information

STA6938-Logistic Regression Model

STA6938-Logistic Regression Model Dr. Ying Zhang STA6938-Logistic Regression Model Topic 2-Multiple Logistic Regression Model Outlines:. Model Fitting 2. Statistical Inference for Multiple Logistic Regression Model 3. Interpretation of

More information

Assessing the Calibration of Dichotomous Outcome Models with the Calibration Belt

Assessing the Calibration of Dichotomous Outcome Models with the Calibration Belt Assessing the Calibration of Dichotomous Outcome Models with the Calibration Belt Giovanni Nattino The Ohio Colleges of Medicine Government Resource Center The Ohio State University Stata Conference -

More information

STAT 7030: Categorical Data Analysis

STAT 7030: Categorical Data Analysis STAT 7030: Categorical Data Analysis 5. Logistic Regression Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2012 Peng Zeng (Auburn University) STAT 7030 Lecture Notes Fall 2012

More information

Exam Applied Statistical Regression. Good Luck!

Exam Applied Statistical Regression. Good Luck! Dr. M. Dettling Summer 2011 Exam Applied Statistical Regression Approved: Tables: Note: Any written material, calculator (without communication facility). Attached. All tests have to be done at the 5%-level.

More information

Simple logistic regression

Simple logistic regression Simple logistic regression Biometry 755 Spring 2009 Simple logistic regression p. 1/47 Model assumptions 1. The observed data are independent realizations of a binary response variable Y that follows a

More information

Stat 8053, Fall 2013: Poisson Regression (Faraway, 2.1 & 3)

Stat 8053, Fall 2013: Poisson Regression (Faraway, 2.1 & 3) Stat 8053, Fall 2013: Poisson Regression (Faraway, 2.1 & 3) The random component y x Po(λ(x)), so E(y x) = λ(x) = Var(y x). Linear predictor η(x) = x β Link function log(e(y x)) = log(λ(x)) = η(x), for

More information

A course in statistical modelling. session 09: Modelling count variables

A course in statistical modelling. session 09: Modelling count variables A Course in Statistical Modelling SEED PGR methodology training December 08, 2015: 12 2pm session 09: Modelling count variables Graeme.Hutcheson@manchester.ac.uk blackboard: RSCH80000 SEED PGR Research

More information

Statistics in medicine

Statistics in medicine Statistics in medicine Lecture 4: and multivariable regression Fatma Shebl, MD, MS, MPH, PhD Assistant Professor Chronic Disease Epidemiology Department Yale School of Public Health Fatma.shebl@yale.edu

More information

Lecture 4 Multiple linear regression

Lecture 4 Multiple linear regression Lecture 4 Multiple linear regression BIOST 515 January 15, 2004 Outline 1 Motivation for the multiple regression model Multiple regression in matrix notation Least squares estimation of model parameters

More information

Logistic Regression Models for Multinomial and Ordinal Outcomes

Logistic Regression Models for Multinomial and Ordinal Outcomes CHAPTER 8 Logistic Regression Models for Multinomial and Ordinal Outcomes 8.1 THE MULTINOMIAL LOGISTIC REGRESSION MODEL 8.1.1 Introduction to the Model and Estimation of Model Parameters In the previous

More information

Review of Multinomial Distribution If n trials are performed: in each trial there are J > 2 possible outcomes (categories) Multicategory Logit Models

Review of Multinomial Distribution If n trials are performed: in each trial there are J > 2 possible outcomes (categories) Multicategory Logit Models Chapter 6 Multicategory Logit Models Response Y has J > 2 categories. Extensions of logistic regression for nominal and ordinal Y assume a multinomial distribution for Y. 6.1 Logit Models for Nominal Responses

More information

Ch 6: Multicategory Logit Models

Ch 6: Multicategory Logit Models 293 Ch 6: Multicategory Logit Models Y has J categories, J>2. Extensions of logistic regression for nominal and ordinal Y assume a multinomial distribution for Y. In R, we will fit these models using the

More information

Clinical Trials. Olli Saarela. September 18, Dalla Lana School of Public Health University of Toronto.

Clinical Trials. Olli Saarela. September 18, Dalla Lana School of Public Health University of Toronto. Introduction to Dalla Lana School of Public Health University of Toronto olli.saarela@utoronto.ca September 18, 2014 38-1 : a review 38-2 Evidence Ideal: to advance the knowledge-base of clinical medicine,

More information

Introduction to General and Generalized Linear Models

Introduction to General and Generalized Linear Models Introduction to General and Generalized Linear Models Generalized Linear Models - part III Henrik Madsen Poul Thyregod Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs.

More information

LOGISTIC REGRESSION. Lalmohan Bhar Indian Agricultural Statistics Research Institute, New Delhi

LOGISTIC REGRESSION. Lalmohan Bhar Indian Agricultural Statistics Research Institute, New Delhi LOGISTIC REGRESSION Lalmohan Bhar Indian Agricultural Statistics Research Institute, New Delhi- lmbhar@gmail.com. Introduction Regression analysis is a method for investigating functional relationships

More information

Cohen s s Kappa and Log-linear Models

Cohen s s Kappa and Log-linear Models Cohen s s Kappa and Log-linear Models HRP 261 03/03/03 10-11 11 am 1. Cohen s Kappa Actual agreement = sum of the proportions found on the diagonals. π ii Cohen: Compare the actual agreement with the chance

More information

STA 450/4000 S: January

STA 450/4000 S: January STA 450/4000 S: January 6 005 Notes Friday tutorial on R programming reminder office hours on - F; -4 R The book Modern Applied Statistics with S by Venables and Ripley is very useful. Make sure you have

More information

Investigating Models with Two or Three Categories

Investigating Models with Two or Three Categories Ronald H. Heck and Lynn N. Tabata 1 Investigating Models with Two or Three Categories For the past few weeks we have been working with discriminant analysis. Let s now see what the same sort of model might

More information

A Handbook of Statistical Analyses Using R 2nd Edition. Brian S. Everitt and Torsten Hothorn

A Handbook of Statistical Analyses Using R 2nd Edition. Brian S. Everitt and Torsten Hothorn A Handbook of Statistical Analyses Using R 2nd Edition Brian S. Everitt and Torsten Hothorn CHAPTER 7 Logistic Regression and Generalised Linear Models: Blood Screening, Women s Role in Society, Colonic

More information

ST3241 Categorical Data Analysis I Logistic Regression. An Introduction and Some Examples

ST3241 Categorical Data Analysis I Logistic Regression. An Introduction and Some Examples ST3241 Categorical Data Analysis I Logistic Regression An Introduction and Some Examples 1 Business Applications Example Applications The probability that a subject pays a bill on time may use predictors

More information

Logistic Regression. Fitting the Logistic Regression Model BAL040-A.A.-10-MAJ

Logistic Regression. Fitting the Logistic Regression Model BAL040-A.A.-10-MAJ Logistic Regression The goal of a logistic regression analysis is to find the best fitting and most parsimonious, yet biologically reasonable, model to describe the relationship between an outcome (dependent

More information

Matched Pair Data. Stat 557 Heike Hofmann

Matched Pair Data. Stat 557 Heike Hofmann Matched Pair Data Stat 557 Heike Hofmann Outline Marginal Homogeneity - review Binary Response with covariates Ordinal response Symmetric Models Subject-specific vs Marginal Model conditional logistic

More information

Modelling Rates. Mark Lunt. Arthritis Research UK Epidemiology Unit University of Manchester

Modelling Rates. Mark Lunt. Arthritis Research UK Epidemiology Unit University of Manchester Modelling Rates Mark Lunt Arthritis Research UK Epidemiology Unit University of Manchester 05/12/2017 Modelling Rates Can model prevalence (proportion) with logistic regression Cannot model incidence in

More information

Modeling Overdispersion

Modeling Overdispersion James H. Steiger Department of Psychology and Human Development Vanderbilt University Regression Modeling, 2009 1 Introduction 2 Introduction In this lecture we discuss the problem of overdispersion in

More information

SAS Analysis Examples Replication C8. * SAS Analysis Examples Replication for ASDA 2nd Edition * Berglund April 2017 * Chapter 8 ;

SAS Analysis Examples Replication C8. * SAS Analysis Examples Replication for ASDA 2nd Edition * Berglund April 2017 * Chapter 8 ; SAS Analysis Examples Replication C8 * SAS Analysis Examples Replication for ASDA 2nd Edition * Berglund April 2017 * Chapter 8 ; libname ncsr "P:\ASDA 2\Data sets\ncsr\" ; data c8_ncsr ; set ncsr.ncsr_sub_13nov2015

More information

Generalized Linear Models

Generalized Linear Models Generalized Linear Models Methods@Manchester Summer School Manchester University July 2 6, 2018 Generalized Linear Models: a generic approach to statistical modelling www.research-training.net/manchester2018

More information

12 Modelling Binomial Response Data

12 Modelling Binomial Response Data c 2005, Anthony C. Brooms Statistical Modelling and Data Analysis 12 Modelling Binomial Response Data 12.1 Examples of Binary Response Data Binary response data arise when an observation on an individual

More information

Logistic Regression. Building, Interpreting and Assessing the Goodness-of-fit for a logistic regression model

Logistic Regression. Building, Interpreting and Assessing the Goodness-of-fit for a logistic regression model Logistic Regression In previous lectures, we have seen how to use linear regression analysis when the outcome/response/dependent variable is measured on a continuous scale. In this lecture, we will assume

More information

CHAPTER 1: BINARY LOGIT MODEL

CHAPTER 1: BINARY LOGIT MODEL CHAPTER 1: BINARY LOGIT MODEL Prof. Alan Wan 1 / 44 Table of contents 1. Introduction 1.1 Dichotomous dependent variables 1.2 Problems with OLS 3.3.1 SAS codes and basic outputs 3.3.2 Wald test for individual

More information

A Generalized Linear Model for Binomial Response Data. Copyright c 2017 Dan Nettleton (Iowa State University) Statistics / 46

A Generalized Linear Model for Binomial Response Data. Copyright c 2017 Dan Nettleton (Iowa State University) Statistics / 46 A Generalized Linear Model for Binomial Response Data Copyright c 2017 Dan Nettleton (Iowa State University) Statistics 510 1 / 46 Now suppose that instead of a Bernoulli response, we have a binomial response

More information

On the Inference of the Logistic Regression Model

On the Inference of the Logistic Regression Model On the Inference of the Logistic Regression Model 1. Model ln =(; ), i.e. = representing false. The linear form of (;) is entertained, i.e. ((;)) ((;)), where ==1 ;, with 1 representing true, 0 ;= 1+ +

More information

Module 4: Regression Methods: Concepts and Applications

Module 4: Regression Methods: Concepts and Applications Module 4: Regression Methods: Concepts and Applications Example Analysis Code Rebecca Hubbard, Mary Lou Thompson July 11-13, 2018 Install R Go to http://cran.rstudio.com/ (http://cran.rstudio.com/) Click

More information

Today. HW 1: due February 4, pm. Aspects of Design CD Chapter 2. Continue with Chapter 2 of ELM. In the News:

Today. HW 1: due February 4, pm. Aspects of Design CD Chapter 2. Continue with Chapter 2 of ELM. In the News: Today HW 1: due February 4, 11.59 pm. Aspects of Design CD Chapter 2 Continue with Chapter 2 of ELM In the News: STA 2201: Applied Statistics II January 14, 2015 1/35 Recap: data on proportions data: y

More information

Various Issues in Fitting Contingency Tables

Various Issues in Fitting Contingency Tables Various Issues in Fitting Contingency Tables Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Complete Tables with Zero Entries In contingency tables, it is possible to have zero entries in a

More information

Unit 1 Review of BIOSTATS 540 Practice Problems SOLUTIONS - Stata Users

Unit 1 Review of BIOSTATS 540 Practice Problems SOLUTIONS - Stata Users BIOSTATS 640 Spring 2017 Review of Introductory Biostatistics STATA solutions Page 1 of 16 Unit 1 Review of BIOSTATS 540 Practice Problems SOLUTIONS - Stata Users #1. The following table lists length of

More information

Two Hours. Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER. 26 May :00 16:00

Two Hours. Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER. 26 May :00 16:00 Two Hours MATH38052 Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER GENERALISED LINEAR MODELS 26 May 2016 14:00 16:00 Answer ALL TWO questions in Section

More information

10: Crosstabs & Independent Proportions

10: Crosstabs & Independent Proportions 10: Crosstabs & Independent Proportions p. 10.1 P Background < Two independent groups < Binary outcome < Compare binomial proportions P Illustrative example ( oswege.sav ) < Food poisoning following church

More information