Docsity

Logistic Regression Analysis: Prediction of Coronary Heart Disease using JMP, Study notes of Statistics

Toggle sidebar
bg1
1
Lecture 22 Logistic Multiple Regression
STAT 102
Logistic Regression is suitable for situations in which the Y
variable is categorical rather than continuous.
We will study only the most common setting, in which the Y
variable is binary (ie, has only two possible values).
Lecture 21 discussed the situation having one continuous X-
variable as a possible predictor.
We now turn to some examples involving more than one X-
variable.
The X-variables may be either continuous or categorical. BUT
Settings in which all X-variables are categorical have some
special features, and will be discussed in Lecture 23.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18

Partial preview of the text

Download Logistic Regression Analysis: Prediction of Coronary Heart Disease using JMP and more Study notes Statistics in PDF only on Docsity!

Lecture 22 Logistic Multiple Regression

STAT 102

Logistic Regression is suitable for situations in which the Y variable is categorical rather than continuous.  We will study only the most common setting, in which the Y variable is binary ( ie , has only two possible values).  Lecture 21 discussed the situation having one continuous X - variable as a possible predictor.  We now turn to some examples involving more than one X - variable.  The X-variables may be either continuous or categorical. BUT  Settings in which all X -variables are categorical have some special features, and will be discussed in Lecture 23.

Two Examples  This Lecture analyzes two separate examples.  If we do not have time in lecture to completely cover both; you should still read and understand both.

Example 1 : Prediction of the Risk of Coronary Heart Disease.

Example 2 : March Madness. ̶ How well do the seedings predict who will win? ̶ Is there a difference in this regard between the Men’s Tournament and the Women’s?

Variables in our Data All variables measured at initial exam

Heart Disease? [This is our Y -variable]: A 0-1 indicator as to whether the initial intensive exam found evidence of CHD.

Age :  SBP : Systolic blood Pressure  DBP : Diastolic Blood Pressure

CHOL : Cholesterol level  FRW : A measure of weight, adjusted for patient’s height and age

CIG : Number of cigarettes smoked/day. [Self Report!]  Sex :

Logistic Regression Model

 Goal is to estimate p (^)  x (^)   Pr Y0 x .

 Here, x represents the independent variables in the model.  The assumed form of p ( x ) is as follows:

    1

e p e

x       where

 Here,  is a general symbol used to denote the value of a linear function of the independent variables.

 Thus, if the model has m quantitative factors and one

qualitative factor (Sex), the model for  is

   0   1 x 1  ...   m xm  Sex.

Be careful. JMP defines p to correspond to the value Y = 0. Most other software defines it to correspond to Y = 1.

Basic Output from a model with all available factors Whole Model Test Model - LogLikelihood DF ChiSquare Prob>ChiSq Difference 63.094 7 126.1882 <. Full 671. Reduced 734.

RSquare (U) 0. Observations 1393

 In the whole model test table ChiSquare = 2( -LogLikelihood)  For this, use the Chi-squared table with 7 df  This tests H 0 : All regression slopes & factor effects = 0.  n = 1406, but Observations = 1393 because 13 patients have some missing data and are automatically excluded from the JMP analysis  We will exclude all these patients from future analyses.  Like in usual multiple regression, RSquare (U) = 63.094 / 734..

Effect Likelihood Ratio Tests Source DF L-R ChiSquare Prob>ChiSq AGE 1 17.613 <. SBP 1 14.684 0. DBP 1 0.142 0. CHOL 1 8.733 0. FRW 1 2.023 0. CIG 1 4.042 0. SEX 1 34.048 <.

 DF here is like in usual tables: 1 DF for each regression coefficient and 1 DF for Sex because there are two sex categories.  The L-R ChiSquare values here come from a “Full” – “Reduced” analysis using the Whole Model Test table like in usual tables.  BUT there’s a secret! We’ll give an example later.  The Prob>ChiSq entries come from these statistics and the Chi- squared table with DF Degrees of Freedom.

Re: The LR Chi Sq entries in the Effect Tests table

 LR Chi Sq values are 2 (Full – Reduced).

 Here’s the Whole Model table for an analysis without DBP: Whole Model Test Model - LogLikelihood DF ChiSquare Prob>ChiSq Difference 63.02 3 6 126.0459 <. Full 671.64 3 Reduced 734.

 Hence the LR ChiSq for testing DBP after controlling for all other variables is 2 671.643  671.572 (^)  2  .072 .

This is the value in the earlier Effect Tests table (except for round-off).

Estimates in JMP

 If you go to “Save Probability Formulas” under the red arrow, you get columns headed Lin[0] Prob[1] Prob[0] Most likely Heart Disease? 3.3073 0.03532 0.9647 0

 The entries in green are those in the row for our special Person

 The Column Lin[0] gives the values of .

 “Most Likely” just tells whether Prob[1] > 1/2.

ROC Table Here are a few lines of the Table Prob 1 - Specificity

Sensitiv Sens+Spec

  • 1

True Pos

True Neg

False Pos

False Neg 0.2028 0.4098 0.7166 0.3069 220 641 445 87 0.2026 0.4107 0.7166 0.30 60 220 640 446 87 0.2023 0.4116 0.7231 0.3116 * 222 639 447 85 0.2018 0.4134 0.7231 0.3097 222 637 449 85 0.2016 0.4153 0.7231 0.307 9 222 635 451 85  The choice p 0 = .2023 gives the rule that maximizes Sens + Spec  This rule is Declare 0 (=NoCHD) if p^ ˆ^  p 0 .2023. Otherwise, Declare 1 (=CHD).  IF half the population at large has noCHD and half does then we can estimate that in future this declaration will be correct with   (^)     Corr 1 Corr noCHD 1 Corr CHD 1 .5884 1 .7231. 2 2 2 2

P  P  P   .

However  The data is a random sample of health care workers. Hence

The best estimate for the proportion of the entire population of health care workers (ages 45-62) with no CHD is

 

(^)  in sample (^1086)

noCHD. sample size 1393

P   

 We can now estimate for the preceding classification rule P (^)  Corr (^)  .7796  .5884  .2204  .7231 ..

 Working out the arithmetic a little more carefully yields

  Corr 1086 639 307 222 639 222 Total "True" 1393 639 447 1393 222 85

P         

We See That

The best estimate for the Prob of a correct classification in a population like that at hand is Total True in the ROC Table

Important Note:

 The preceding choice of rule, with p 0 = .5052, has assumed that False Positives and False Negatives are equally serious.  That’s not true here.  As an example: Let’s assume

 Diagnosing a nonCHD person as having CHD (a “False Pos”) causes one “unit” of pain and discomfort.; and

 Diagnosing a CHD person as being nonCHD (a “False Neg”)

causes 10 “units” of pain and discomfort.

 Then we want to minimize 1#FalsePos + 10 #FalseNeg

 This occurs at p 0 = .1033 with Sens = .9642 & Spec + .2072.

 Then have many FalsePos (861) but very few FalseNeg (11)

Example 2 March madness

Every March the NCAA holds its annual Div 1 College Basketball Tournaments (for Women and for Men). Teams are seeded into four “brackets” of 16 in each tournament In each bracket the teams are “seeded” from 1 (best) to 16 (worst). They play a single elimination tournament. At the end, the winners of the four brackets hold a four team single-elimination mini-tourney. How good are the seedings? (How often does the better seeded team win?) For the past few years it has been claimed that the women are more accurately seeded than the men. (If so, this may be because the ability differences among the women’s teams are wider.) Is this the case?

 We ran a logistic multiple regression with ̶ Y = WIN, and

 Model Effects: ̶ DIFF ̶ M or W ̶ Year ̶ ROUND

Year and ROUND are included primarily as control variables, but strong significance of either one could be of interpretive interest  DIFF is expected to be the dominant effect.

Because we have coded DIFF0, and because JMP estimates Prob(Y=0) – ie , the probability of an upset – we expect the DIFF coefficient to be >  M or W is the effect of primary interest. If the coefficient for Men is significant & >0 that will show that underdogs do better in the Men’s tourney, even after taking account of the seeding (=DIFF) and the Year and Round.