Logistic Regression II Simple 2x2 Table (courtesy Hosmer and Lemeshow) Exposure=1Exposure=0 Disease = 1 Disease = 0.

Slides:



Advertisements
Similar presentations
Continued Psy 524 Ainsworth
Advertisements

A. The Basic Principle We consider the multivariate extension of multiple linear regression – modeling the relationship between m responses Y 1,…,Y m and.
Brief introduction on Logistic Regression
The %LRpowerCorr10 SAS Macro Power Estimation for Logistic Regression Models with Several Predictors of Interest in the Presence of Covariates D. Keith.
A Model to Evaluate Recreational Management Measures Objective I – Stock Assessment Analysis Create a model to distribute estimated landings (A + B1 fish)
Logistic Regression I Outline Introduction to maximum likelihood estimation (MLE) Introduction to Generalized Linear Models The simplest logistic regression.
Simple Logistic Regression
Overview of Logistics Regression and its SAS implementation
6.1.4 AIC, Model Selection, and the Correct Model oAny model is a simplification of reality oIf a model has relatively little bias, it tends to provide.
April 25 Exam April 27 (bring calculator with exp) Cox-Regression
Logistic Regression Multivariate Analysis. What is a log and an exponent? Log is the power to which a base of 10 must be raised to produce a given number.
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
Chapter 11 Survival Analysis Part 3. 2 Considering Interactions Adapted from "Anderson" leukemia data as presented in Survival Analysis: A Self-Learning.
PH6415 Review Questions. 2 Question 1 A journal article reports a 95%CI for the relative risk (RR) of an event (treatment versus control as (0.55, 0.97).
Sociology 601 Class 28: December 8, 2009 Homework 10 Review –polynomials –interaction effects Logistic regressions –log odds as outcome –compared to linear.
Introduction to Logistic Regression. Simple linear regression Table 1 Age and systolic blood pressure (SBP) among 33 adult women.
Chapter 11 Survival Analysis Part 2. 2 Survival Analysis and Regression Combine lots of information Combine lots of information Look at several variables.
EPI 809/Spring Multiple Logistic Regression.
Nemours Biomedical Research Statistics April 23, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
1 Modeling Ordinal Associations Section 9.4 Roanna Gee.
Logistic Regression Biostatistics 510 March 15, 2007 Vanessa Perez.
Notes on Logistic Regression STAT 4330/8330. Introduction Previously, you learned about odds ratios (OR’s). We now transition and begin discussion of.
WLS for Categorical Data
Adjusting for extraneous factors Topics for today More on logistic regression analysis for binary data and how it relates to the Wolf and Mantel- Haenszel.
BIOST 536 Lecture 4 1 Lecture 4 – Logistic regression: estimation and confounding Linear model.
STAT E-150 Statistical Methods
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 12: Multiple and Logistic Regression Marshall University.
Logistic Regression. Outline Review of simple and multiple regressionReview of simple and multiple regression Simple Logistic RegressionSimple Logistic.
Logistic Regression III: Advanced topics Conditional Logistic Regression for Matched Data Conditional Logistic Regression for Matched Data.
Simple Linear Regression
Logistic Regression I HRP 261 2/09/04 Related reading: chapters and of Agresti.
Lecture 15: Logistic Regression: Inference and link functions BMTRY 701 Biostatistical Methods II.
April 11 Logistic Regression –Modeling interactions –Analysis of case-control studies –Data presentation.
EIPB 698E Lecture 10 Raul Cruz-Cano Fall Comments for future evaluations Include only output used for conclusions Mention p-values explicitly (also.
Week 6: Model selection Overview Questions from last week Model selection in multivariable analysis -bivariate significance -interaction and confounding.
April 6 Logistic Regression –Estimating probability based on logistic model –Testing differences among multiple groups –Assumptions for model.
2 December 2004PubH8420: Parametric Regression Models Slide 1 Applications - SAS Parametric Regression in SAS –PROC LIFEREG –PROC GENMOD –PROC LOGISTIC.
Applied Epidemiologic Analysis - P8400 Fall 2002
1 היחידה לייעוץ סטטיסטי אוניברסיטת חיפה פרופ’ בנימין רייזר פרופ’ דוד פרג’י גב’ אפרת ישכיל.
LOGISTIC REGRESSION A statistical procedure to relate the probability of an event to explanatory variables Used in epidemiology to describe and evaluate.
Logistic Regression. Conceptual Framework - LR Dependent variable: two categories with underlying propensity (yes/no) (absent/present) Independent variables:
Linear vs. Logistic Regression Log has a slightly better ability to represent the data Dichotomous Prefer Don’t Prefer Linear vs. Logistic Regression.
April 4 Logistic Regression –Lee Chapter 9 –Cody and Smith 9:F.
Lecture 14: Introduction to Logistic Regression BMTRY 701 Biostatistical Methods II.
BIOST 536 Lecture 1 1 Lecture 1 - Introduction Overview of course  Focus is on binary outcomes  Some ordinal outcomes considered Simple examples Definitions.
Logistic Regression. Linear Regression Purchases vs. Income.
1 STA 617 – Chp10 Models for matched pairs Summary  Describing categorical random variable – chapter 1  Poisson for count data  Binomial for binary.
Multiple Logistic Regression STAT E-150 Statistical Methods.
Log-linear Models HRP /03/04 Log-Linear Models for Multi-way Contingency Tables 1. GLM for Poisson-distributed data with log-link (see Agresti.
1 Topic 4 : Ordered Logit Analysis. 2 Often we deal with data where the responses are ordered – e.g. : (i) Eyesight tests – bad; average; good (ii) Voting.
Sigmoidal Response (knnl558.sas). Programming Example: knnl565.sas Y = completion of a programming task (1 = yes, 0 = no) X 2 = amount of programming.
Applied Epidemiologic Analysis - P8400 Fall 2002 Labs 6 & 7 Case-Control Analysis ----Logistic Regression Henian Chen, M.D., Ph.D.
Logistic Regression Analysis Gerrit Rooks
Logistic Regression Saed Sayad 1www.ismartsoft.com.
1 Introduction to Modeling Beyond the Basics (Chapter 7)
EIPB 698D Lecture 5 Raul Cruz-Cano Spring Midterm Comments PROC MEANS VS. PROS SURVEYMEANS For non–parametric: Kriskal-Wallis.
Applied Epidemiologic Analysis - P8400 Fall 2002 Labs 6 & 7 Case-Control Analysis ----Logistic Regression Henian Chen, M.D., Ph.D.
04/19/2006Econ 6161 Econ 616 – Spring 2006 Qualitative Response Regression Models Presented by Yan Hu.
Birthweight (gms) BPDNProp Total BPD (Bronchopulmonary Dysplasia) by birth weight Proportion.
Analysis of matched data Analysis of matched data.
BINARY LOGISTIC REGRESSION
Logistic Regression APKC – STATS AFAC (2016).
Advanced Quantitative Techniques
CHAPTER 7 Linear Correlation & Regression Methods
Notes on Logistic Regression
Advanced Quantitative Techniques
Multiple logistic regression
ביצוע רגרסיה לוגיסטית. פרק ה-2
Introduction to Logistic Regression
Presentation transcript:

Logistic Regression II

Simple 2x2 Table (courtesy Hosmer and Lemeshow) Exposure=1Exposure=0 Disease = 1 Disease = 0

(courtesy Hosmer and Lemeshow) Odds Ratio for simple 2x2 Table

Example 1: CHD and Age (2x2) (from Hosmer and Lemeshow) =>55 yrs<55 years CHD Present CHD Absent

Example 1: CHD and Age (2x2) (from Hosmer and Lemeshow) =>55 yrs<55 years CHD Present CHD Absent

The Logit Model

The Likelihood

The Log Likelihood

Derivative(s) of the log likelihood

Maximize  =Odds of disease in the unexposed (<55)

Maximize  1

Hypothesis Testing H 0 :  =0 2. The Likelihood Ratio test: 1. The Wald test: Reduced=reduced model with k parameters; Full=full model with k+p parameters Null value of beta is 0 (no association)

Hypothesis Testing H 0 :  =0 2. What is the Likelihood Ratio test here? – Full model = includes age variable – Reduced model = includes only intercept Maximum likelihood for reduced model ought to be (.43) 43 x(.57) 57 (57 cases/43 controls)…does MLE yield this?… 1. What is the Wald Test here?

The Reduced Model

Likelihood value for reduced model = marginal odds of CHD!

Likelihood value of full model

Finally the LR…

Example 2: >2 exposure levels *(dummy coding) CHD status WhiteBlackHispanicOther Present Absent2010 (From Hosmer and Lemeshow)

SAS CODE data race; input chd race_2 race_3 race_4 number; datalines; end; run; proc logistic data=race descending; weight number; model chd = race_2 race_3 race_4; run; Note the use of “dummy variables.” “Baseline” category is white here.

What’s the likelihood here? In this case there is more than one unknown beta (regression coefficient)— so this symbol represents a vector of beta coefficients.

SAS OUTPUT – model fit Intercept Intercept and Criterion Only Covariates AIC SC Log L Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio Score Wald

SAS OUTPUT – regression coefficients Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept race_ race_ race_

SAS output – OR estimates The LOGISTIC Procedure Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits race_ race_ race_ Interpretation: 8x increase in odds of CHD for black vs. white 6x increase in odds of CHD for hispanic vs. white 4x increase in odds of CHD for other vs. white

Example 3: Prostrate Cancer Study (same data as from lab 3) Question: Does PSA level predict tumor penetration into the prostatic capsule (yes/no)? (this is a bad outcome, meaning tumor has spread). Is this association confounded by race? Does race modify this association (interaction)?

1.What’s the relationship between PSA (continuous variable) and capsule penetration (binary)?

Capsule (yes/no) vs. PSA (mg/ml) psa vs. capsule capsule psa

Mean PSA per quintile vs. proportion capsule=yes  S-shaped? proportion with capsule=yes PSA (mg/ml)

logit plot of psa predicting capsule, by quintiles  linear in the logit?

logit plot of psa predicting capsule, by QUARTILE  linear in the logit?

logit plot of psa predicting capsule, by decile  linear in the logit?

model: capsule = psa model: capsule = psa Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio <.0001 Score <.0001 Wald <.0001 Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept <.0001 psa <.0001

Model: capsule = psa race Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept psa <.0001 race No indication of confounding by race since the regression coefficient is not changed in magnitude.

Model: capsule = psa race psa*race Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept psa race psa*race Evidence of effect modification by race (p=.07).

race= Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept <.0001 psa < race= Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept psa STRATIFIED BY RACE:

How to calculate ORs from model with interaction term Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept psa race psa*race Increased odds for every 5 mg/ml increase in PSA: If white (race=0): If black (race=1):

How to calculate ORs from model with interaction term Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept psa race psa*race Increased odds for every 5 mg/ml increase in PSA: If white (race=0): If black (race=1):

ORs for increasing psa at different levels of race.

OR for being black (vs. white), at different levels of psa.

Predictions The model: What’s the predicted probability for a white man with psa level of 10 mg/ml?

Predictions The model: What’s the predicted probability for a black man with psa level of 10 mg/ml?

Predictions The model: What’s the predicted probability for a white man with psa level of 0 mg/ml (reference group)?

Predictions The model: What’s the predicted probability for a black man with psa level of 0 mg/ml?

Diagnostics: Residuals What’s a residual in the context of logistic regression? Residual=observed-predicted For logistic regression: residual= 1 – predicted probability OR residual = 0 – predicted probability

Diagnostics: Residuals What’s the residual for a white man with psa level of 0 mg/ml who has capsule penetration? What’s the residual for a white man with psa level of 0 mg/ml who does not have capsule penetration?

In SAS…recall model with psa and gleason… proc logistic data = hrp261.psa; model capsule (event="1") = psa gleason; output out=MyOutdata l=MyLowerCI p=Mypredicted u=MyUpperCI resdev=Myresiduals; run; proc gplot data = MyOutdata; plot Myresiduals*predictor; run;

Residual*psa

Estimated prob*gleason