1 Introduction to Modeling Beyond the Basics (Chapter 7)

33
1 Introduction to Modeling Beyond the Basics (Chapter 7)

description

3 How can we analyse these data? Table 1 Age and systolic blood pressure (SBP) among 33 adult women

Transcript of 1 Introduction to Modeling Beyond the Basics (Chapter 7)

Page 1: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

1

Introduction to Modeling

Beyond the Basics (Chapter 7)

Page 2: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

2

Content

• Simple and multiple linear regression• Simple logistic regression

– The logistic function– Estimation of parameters– Interpretation of coefficients

• Multiple logistic regression– Interpretation of coefficients– Coding of variables

Page 3: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

3

How can we analyse these data?

Age SBP Age SBP Age SBP 22 131 41 139 52 128 23 128 41 171 54 105 24 116 46 137 56 145 27 106 47 111 57 141 28 114 48 115 58 153 29 123 49 133 59 157 30 117 49 128 63 155 32 122 50 183 67 176 33 99 51 130 71 172 35 121 51 133 77 178 40 147 51 144 81 217

Table 1 Age and systolic blood pressure (SBP) among 33 adult women

Page 4: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

4

80

100

120

140

160

180

200

220

20 30 40 50 60 70 80 90

SBP (mm Hg)

Age (years)

adapted from Colton T. Statistics in Medicine. Boston: Little Brown, 1974

Page 5: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

5

Simple linear regression• Relation between 2 continuous variables (SBP and age)

• Regression coefficient 1– Measures association between y and x– Amount by which y changes on average when x changes by one unit– Least squares method

y

x

11xβα(y) Slope

Page 6: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

6

Multiple linear regression

• Relation between a continuous variable and a set ofi continuous or categorical variables

• Partial regression coefficients i

– Amount by which y changes on average when xi changes by one unit and all the other xis remain constant

– Measures association between xi and y adjusted for all other xi

• Example– SBP versus age, weight, height, etc

xβ ... xβ xβαy ii2211

Page 7: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

7

Multiple linear regression

Dependent Independent variablesPredicted Predictor variablesResponse variable Explanatory variablesOutcome variable Covariables

xβ ... xβ xβα y ii2211

Page 8: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

8

Multivariate analysis

Model Outcome

Linear regression continousPoisson regression countsCox model survivalLogistic regression binomial......

• Choice of the tool according to study, objectives, and the variables

– Control of confounding– Model building, prediction

Page 9: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

9

Logistic regression

• Models the relationship between a set of variables xi– dichotomous (eat : yes/no)– categorical (social class, ... )– continuous (age, ...)

and

– dichotomous variable Y

• Dichotomous (binary) outcome most common situation in biology and epidemiology

Page 10: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

10

How can we analyse these data?

Table 2 Age and signes of Coronary Heart Disease (CHD) , 33 women

CHD CHD CHD

Page 11: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

11

How can we analyse these data?

• Comparison of the mean age of diseased and non-diseased women

– Non-diseased: 38.6 years– Diseased: 58.7 years (p<0.0001)

• Linear regression?

Page 12: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

12

Dot-plot: Data from Table 2

Page 13: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

13

NO

YES

Y = -0.527 + 0.20 x AGE

Page 14: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

14

Table 3 - Prevalence (%) of signs of CHD according to age group

Page 15: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

15

0

20

40

60

80

100

0 1 2 3 4 5 6 7

Age group

CHD

(%)

20-29 30-39 40-49 50-59 60-69 70-79 80-89

Dot-plot: Data from Table 3

Page 16: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

16

Dot-plot: Data from Table 3

0

20

40

60

80

100

0 2 4 6 8

Diseased %

Age (years)

P1-P

Page 17: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

17

Dot-plot: Data from Table 3

-100-80-60-40-20

020406080

100

0 2 4 6 8

Diseased %

Age (years)

Page 18: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

18

The logistic function (2)

logit of P(y|x)

{

Page 19: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

19

The logistic function (1)

0.0

0.2

0.4

0.6

0.8

1.0Probability of disease

x

Page 20: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

20

The logistic function (2)

logit of P(y|x)

{

Page 21: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

21

The logistic function (3)

• Advantages of the logit– Simple transformation of P(y|x)– Linear relationship with x

– Can be continuous (Logit between - to + )– Known binomial distribution (P between 0 and 1)– Directly related to the notion of odds of disease

βxαP-1

P ln

eP-1

P βxα

Page 22: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

22

Interpretation of (1)

eP-1

P βxα

Page 23: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

23

Practice 1. MI and Hyperhomocysteinemia?

Hyper Homocysteinemia

no yes Total

control 62 21 83

case 42 41 83

Total 104 62 166

Page 24: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

24

Practice 1

Normal Homocysteine

HighHomocysteine

MI (%) 40.38 66.13

Odds 0.68 1.95

Ln(Odds) -0.39 0.67

βxαP-1

P ln

Page 25: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

25

βxαP-1

P ln

• Normal HC X = 0 ln(Odds)= + x 0 = ln(Odds) ……. = -0.39

• High HC X=1 ln(Odds)= + x 1 = ln(Odds)- ……. = 0.67 - (-0.39) = 1.06

• OR ? = e = 2.88• SE = 0.33 How can you interpret /OR?

Page 26: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

26

Interpretation of (2)

• = increase in log-odds for a one unit increase in x• Test of the hypothesis that =0 (Wald test)

• Interval testing

df) (1 Variance(

2β)

β2

OR

Page 27: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

27

If you run Linear Regression …

Y = .04 + 0.257 x High HC

% MI in High HC = 66.13% MI in Normal HC = 40.38

Diff = 25.7 %1

What is your interpretation about 1 ?

Page 28: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

28

Example

• Age (<55 and 55+ years) and risk of developing coronary heart disease (CD)

Page 29: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

29

• Results of fitting Logistic Regression Model

Age 2.094 0.841- Age βαP-1

P ln 1

Page 30: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

30

Interpretation of (1)

eP-1

P βxα

Page 31: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

31

Multiple logistic regression

• More than one independent variable– Dichotomous, ordinal, nominal, continuous …

• Interpretation of i – Increase in log-odds for a one unit increase in xi with all the

other xis constant– Measures association between xi and log-odds adjusted for

all other xi

ii2211 xβ ... xβ xβαP-1

P ln

Page 32: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

32

Multiple logistic regression

• Effect modification– Can be modelled by including interaction terms

1132211 xxβ xβ xβαP-1

P ln

Page 33: 1 Introduction to Modeling Beyond the Basics (Chapter 7)

33

Reference

• Hosmer DW, Lemeshow S. Applied logistic regression.Wiley & Sons, New York, 1989