statistical interaction / effect modification · •you stratify by effect modifiers •there is a...

51
Statistical Interaction / Effect Modification Dr Celia Gregson Day 2; Tuesday 12 th www.theSAMSON.org

Upload: others

Post on 15-Jul-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Statistical Interaction / Effect Modification

Dr Celia Gregson

Day 2; Tuesday 12th

www.theSAMSON.org

Page 2: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Learning Objectives

To be able to:

1. Define interaction

2. Understand the difference between confounding and interaction

3. Know how to test for interaction

4. Know how to deal with interaction in your analyses

Page 3: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Definitions

Interaction

• Interaction occurs when the presence of one factor modifies the effect of another on an outcome

• i.e. the effect of the exposure differs according to which category of the other factor is being examined

Confounding

• Occurs when an association between an exposure and an outcome is mixed up with the effect of another exposure on the outcome, and the two exposures are related to one another

• For something to be a confounder, it must be associated with the exposure and independently associated with the outcome

Page 4: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Confounding vs. Interaction

Interaction

• An important property of the relationship between two factors, and their influence on an outcome

• You do not try to eliminate this effect, instead you want to detect and describe interaction in the greatest possible detail

• You stratify by effect modifiers

• There is a statistical test for interaction

Confounding

• Concerned with ‘alternative explanations’ for an effect of an exposure on outcome

• We aim to remove the influence of a confounder in order to get nearer the ‘truth’

• You control for confounding factors

• There is no statistical test for confounding

Page 5: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: ConfoundingCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Page 6: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: ConfoundingCoffee consumption and Cancer

Coffee No coffee

Cases (Cancer) 450 300

Controls (No cancer) 200 250

Exposure Outcome

Coffee consumption Cancer

Page 7: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: ConfoundingCoffee consumption and Cancer

Coffee No coffee

Cases (Cancer) 450 300

Controls (No cancer) 200 250

Odds Ratio = 1.9

Exposure Outcome

Coffee consumption Cancer

= 450/300 = 1.5200/250 0.8

Page 8: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: ConfoundingCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Confounder

Smoking

Page 9: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: ConfoundingCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Confounder

Smoking

Smokers Non-smokers

Coffee No coffee Coffee No coffee

Cases (Cancer) 400 200 50 100

Controls (No cancer) 100 50 100 200

Page 10: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: ConfoundingCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Confounder

Smoking

Smokers Non-smokers

Coffee No coffee Coffee No coffee

Cases (Cancer) 400 200 50 100

Controls (No cancer) 100 50 100 200

Odds Ratio = 1.0 Odds Ratio = 1.0

Page 11: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: ConfoundingCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Confounder

Smoking

Smokers Non-smokers

Coffee No coffee Coffee No coffee

Cases (Cancer) 400 200 50 100

Controls (No cancer) 100 50 100 200

Odds Ratio = 1.0 Odds Ratio = 1.0Conclusion: Smoking is totally confounding the association between coffee drinking and cancer

Page 12: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: InteractionCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Confounder

Smoking

Page 13: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: InteractionCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Confounder

Smoking

Smokers Non-smokers

Coffee No coffee Coffee No coffee

Cases (Cancer) 400 100 50 200

Controls (No cancer) 100 50 100 200

Page 14: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: InteractionCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Confounder

Smoking

Smokers Non-smokers

Coffee No coffee Coffee No coffee

Cases (Cancer) 400 100 50 200

Controls (No cancer) 100 50 100 200

Odds Ratio = 2.0 Odds Ratio = 0.5

Page 15: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: InteractionCoffee consumption and Cancer

Exposure Outcome

Coffee consumption Cancer

Confounder

Smoking

Smokers Non-smokers

Coffee No coffee Coffee No coffee

Cases (Cancer) 400 100 50 200

Controls (No cancer) 100 50 100 200

Odds Ratio = 2.0 Odds Ratio = 0.5Conclusion: Smoking modifies the effect of coffee drinking on cancer

Page 16: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

• A study of sexual behaviours and risk of HIV infection

• 400 men with HIV recruited from general medical clinic

• 400 men coming to clinic and testing negative for HIV also recruited

• All were asked about number of sexual partners and condom use

• Study design?

Page 17: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

• A study of sexual behaviours and risk of HIV infection

• 400 men with HIV recruited from general medical clinic

• 400 men coming to clinic and testing negative for HIV also recruited

• All were asked about number of sexual partners and condom use

• Study design?

Case-control study design

Page 18: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

HIV + HIV -

Number of sexual partners in past 5 years

≥5 200 100

<5 200 300

Page 19: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

HIV + HIV -

Number of sexual partners in past 5 years

≥5 200 100

<5 200 300 Odds ratio: 3.0

Page 20: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

HIV + HIV -

Number of sexual partners in past 5 years

≥5 200 100

<5 200 300 Odds ratio: 3.0

= 200/100200/300

Page 21: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

HIV + HIV -

Number of sexual partners in past 5 years

≥5 200 100

<5 200 300 Odds ratio: 3.0

Men who report always using a condom Men who report not always using a condom

= 200/100200/300

Page 22: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

HIV + HIV -

Number of sexual partners in past 5 years

≥5 200 100

<5 200 300 Odds ratio: 3.0

HIV + HIV -

Number of sexual partners in past 5 years

≥5 50 60

<5 80 140

Men who report always using a condom

HIV + HIV -

Number of sexual partners in past 5 years

≥5 150 40

<5 120 160

Men who report not always using a condom

= 200/100200/300

Page 23: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

HIV + HIV -

Number of sexual partners in past 5 years

≥5 200 100

<5 200 300 Odds ratio: 3.0

HIV + HIV -

Number of sexual partners in past 5 years

≥5 50 60

<5 80 140

Men who report always using a condom

HIV + HIV -

Number of sexual partners in past 5 years

≥5 150 40

<5 120 160

Men who report not always using a condom

Odds ratio: 1.45 Odds ratio: 5.0

= 200/100200/300

Page 24: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Sexual behaviour and risk of HIV infection among men in Kenya

HIV + HIV -

Number of sexual partners in past 5 years

≥5 200 100

<5 200 300 Odds ratio: 3.0

HIV + HIV -

Number of sexual partners in past 5 years

≥5 50 60

<5 80 140

Men who report always using a condom

HIV + HIV -

Number of sexual partners in past 5 years

≥5 150 40

<5 120 160

Men who report not always using a condom

Odds ratio: 1.45 Odds ratio: 5.0

Conclusion: there is an interaction between the number of sexual partners and condom use on the odds of HIV infection

i.e. reporting using a condom modifies the effect of the number of sexual partners on the odds of HIV infection, so that reporting condom use lowers the effect of higher sexual partner number on the odds of HIV infection

= 200/100200/300

Page 25: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Summary

Crude odds/ rate/ risk ratio

Odds/ rate/ risk ratio in Stratum 1

Odds/ rate/ risk ratio in Stratum 2

Adjusted odds/ rate/ risk ratio

Example 1No confounding

No interaction3.0 3.0 3.0 3.0

Example 2Confounding

No interaction3.0 2.0 2.0 2.0

Example 3 Interaction 3.0 0.8 5.5Should not be

calculated

Page 26: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Now thinking about continuous dataB

on

e m

ass

Page 27: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Adding a line of best fitB

on

e m

ass

Page 28: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Adding a line of best fitB

on

e m

ass

Page 29: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Adding a line of best fitB

on

e m

ass

Page 30: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

The intercept and the slope

Bone mass

Bo

ne

mas

s

Page 31: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Two populations within this distributionB

on

e m

ass

Page 32: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Each with lines of best fit with the same slopesB

on

e m

ass

Page 33: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

…or different slopes… This is interactionB

on

e m

ass

Page 34: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

An example: Total Body BMD by Age

.81

1.2

1.4

1.6

1.8

Tota

l b

od

y B

MD

, to

tal bo

dy D

XA

1

20 40 60 80 100Age at time of total body DXA scan

Page 35: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Adding in a regression line:

.81

1.2

1.4

1.6

1.8

20 40 60 80 100Age at time of total body DXA scan

Tota

l Bo

dy

BM

D

Page 36: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

regress outcome exposure

Page 37: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for
Page 38: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Slope of the line

95% confident the slope is within this rangeUsed to calculate

95% CI

Probability a result like this would have come about if in reality there is no association with outcome

Amount of variance explained by model

Proportion of variance explained by model

Variables in the model

Page 39: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

But there are 2 populations – with and without high bone mass

.81

1.2

1.4

1.6

1.8

Tota

l b

od

y B

MD

, to

tal bo

dy D

XA

1

20 40 60 80 100Age at time of total body DXA scan

HBM cases in redNormal individuals in blue

Page 40: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Testing for interaction:Is the slope of the regression lines different?

.81

1.2

1.4

1.6

1.8

20 40 60 80 100Age at time of total body DXA scan

HBM cases in redNormal individuals in blue

HBM 1Non-HBM 0

Tota

l Bo

dy

BM

D

Page 41: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Test for interaction: reg tb_bmd i.hbm##c.age

Page 42: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Y axis intercept for baseline group (non-HBM)

Slope of line for baseline group (non-HBM)

Test for interaction: reg tb_bmd i.hbm##c.age

Page 43: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Y axis intercept for baseline group (non-HBM)

Slope of line for baseline group (non-HBM)

age + hbm#c.age = Slope of line for HBM group

Test for interaction: reg tb_bmd i.hbm##c.age

Page 44: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Y axis intercept for baseline group (non-HBM)

Slope of line for baseline group (non-HBM)

age + hbm#c.age = Slope of line for HBM group

1.hbm + _cons = Y axis intercept for HBM group

Test for interaction: reg tb_bmd i.hbm##c.age

Page 45: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Y axis intercept for baseline group (non-HBM)

Slope of line for baseline group (non-HBM)

age + hbm#c.age = Slope of line for HBM group

1.hbm + _cons = Y axis intercept for HBM group

Wald p value for interaction termhbm#c.age

Test for interaction: reg tb_bmd i.hbm##c.age

Page 46: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Post regression command: lincom

age + hbm#c.age = Slope of line for HBM group

1.hbm + _cons = Y axis intercept for HBM group

Page 47: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Testing for interaction:Is the slope of the regression lines different? – Yes!

.81

1.2

1.4

1.6

1.8

20 40 60 80 100Age at time of total body DXA scan

HBM cases in redNormal individuals in blue

HBM 1Non-HBM 0

Tota

l Bo

dy

BM

D

Page 48: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Another example: The effect of social deprivation (quintiles) on hip fracture incidence in England

Bhimjiyani. Osteo Int. 2018. 29 (1), 115-24

Page 49: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Another example: The effect of social deprivation (quintiles) on hip fracture incidence in England

Bhimjiyani. Osteo Int. 2018. 29 (1), 115-24

Page 50: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Summary

Crude odds/ rate/ risk ratio

Odds/ rate/ risk ratio in Stratum 1

Odds/ rate/ risk ratio in Stratum 2

Adjusted odds/ rate/ risk ratio

Example 1No confounding

No interaction3.0 3.0 3.0 3.0

Example 2Confounding

No interaction3.0 2.0 2.0 2.0

Example 3 Interaction 3.0 0.8 5.5Should not be

calculated

Page 51: Statistical Interaction / Effect Modification · •You stratify by effect modifiers •There is a statistical test for interaction Confounding •Concerned with ‘alternative explanations’for

Summary - Interaction

• Interaction occurs when the presence of one factor modifies the effect of another on an outcome. i.e. the effect of the exposure differs according to which category of the other factor is being examined

• Interaction is an important property of the relationship between two factors, and their influence on an outcome

• You do not try to eliminate this effect, instead you want to detect and describe interaction in the greatest possible detail

• You stratify by effect modifiers

• There is a statistical test for interaction