what is event history analysis? fiona steele centre for multilevel modelling university of bristol

29
What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

Upload: chase-mcmahon

Post on 28-Mar-2015

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

What is Event History Analysis?

Fiona SteeleCentre for Multilevel Modelling

University of Bristol

Page 2: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

2

What is Event History Analysis?

Methods for analysis of length of time until the occurrence of some event. The dependent variable is the duration until event occurrence.

EHA also known as:

• Survival analysis (particularly in biostatistics and when event is not repeatable)• Duration analysis• Hazard modelling

Page 3: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

3

Examples of Applications

• Education – time to leaving full-time education (from end of compulsory education); time to exit from teaching profession

• Economics – duration of an episode of unemployment or employment

• Demography – time to first birth (from when?); time to first marriage; time to divorce

• Psychology – duration to response to some stimulus

Page 4: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

4

Types of Event History Data

• Dates of start of exposure period and events, e.g. dates of start and end of an employment spell

– Usually collected retrospectively

– UK sources include BHPS and cohort studies (partnership, birth, employment, and housing histories)

• Current status data from panel study, e.g. current employment status each year

– Collected prospectively

Page 5: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

5

Special Features of Event History Data

• Durations are always positive and their distribution is often skewed

• Censoring – there are usually people who have not yet experienced the event when we observe them

• Time-varying covariates – the values of some covariates may change over time

Page 6: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

6

Censoring

• Right-censoring is the most common form of censoring. Durations are right-censored if the event has not occurred by the end of the observation period.

– E.g. in a study of divorce, most respondents will still be married when last observed

• Excluding right-censored observations leads to bias and may drastically reduce sample size

Page 7: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

7

Event Times and Censoring Times ti event time for individual i ci censoring indicator =1 if uncensored (i.e. observed to have event) =0 if censored For a right-censored case, we do not observe ti. We observe only the time at which they were censored. Dependent variable is yi, the smaller of ti and the censoring time. Our observed data are (yi, ci).

Page 8: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

8

Key Quantities in EHA

• In EHA, interest is usually focused on the hazard function h(t) and the survivor function S(t)

• h(t) is the probability of having at event at time t, given that the event has not occurred before t

• S(t) is the probability that an event has not occurred before time t

Page 9: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

9

Life Table Estimation of h(t)

• Group durations into intervals t=1,2,3,… (often already in this form)

• Record no. at risk at start of interval r(t), no. events during interval d(t), and no. censored during interval w(t)

• An estimate of the hazard is d(t)/r(t). Sometimes there is a correction for censoring

Page 10: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

10

Estimation of S(t)

Estimator of survivor function for interval t is

)]1(ˆ1[)]...2(ˆ1[)]1(ˆ1[)(ˆ thhhtS

Page 11: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

11

Example: Time to 1st Partnership

t r(t) d(t) w(t) h(t) S(t) 16 500 9 0 0.02 1 17 491 20 0 0.04 0.98 18 471 32 0 0.07 0.94 19 439 52 0 0.12 0.88 20 387 49 0 0.13 0.77

. . . . . .

. . . . . . 32 39 3 0 0.08 0.08 33 36 1 35 0.03 0.07

Source: Subsample from the National Child Development Study

Page 12: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

12

Example of Interpretation

• h(16)=0.02 so 2% partnered at age 16

• h(20)=0.13 so of those who were unpartnered at their 20th birthday, 13% partnered before age 21

• S(20)=0.77 so 77% had not partnered by age 20

Page 13: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

13

Hazard of 1st Partnership

0

0.05

0.1

0.15

0.2

0.25

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Age

h(t)

Page 14: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

14

Survivor Function: Probability of Remaining Unpartnered

0

0.2

0.4

0.6

0.8

1

1.2

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

Age

S(t)

Page 15: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

15

Introducing Covariates: Event History Modelling

• Assumptions about the shape of the hazard function

• Whether time is treated as continuous or discrete

• Whether the effects of covariates can be assumed constant over time (proportional hazards)

There are many different types of event history model, which vary according to:

Page 16: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

16

The Cox Proportional Hazards Model

• Makes no assumptions about the shape of the hazard function

• Treats time as a continuous or discrete

• Assumes that the effects of covariates are constant over time (although this can be modified)

The most commonly applied model which:

Page 17: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

17

The Cox Proportional Hazards Model

hi(t) is hazard for individual i at time t

xi is a covariate with coefficient β

h0(t) is the baseline hazard, i.e. hazard when xi=0

The Cox model can be written

hi(t) = h0(t) exp(βxi)

or sometimes as

log hi(t) = log h0(t) + βxi

Note: x could be time-varying, i.e. xi(t)

Page 18: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

18

Cox Model: Interpretation

• exp(β) - also written as eβ - is called the relative risk

• For each 1-unit increase in x the hazard is multiplied by exp(β)

• exp(β)>1 implies a positive effect on hazard, i.e. higher values of x associated with shorter durations

• exp(β)<1 implies a negative effect on hazard, i.e. higher values of x associated with longer durations

Page 19: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

19

Cox Model: Gender Differences in Age at 1st Partnership

Variables in the Equation

.401 .093 18.419 1 .000 1.493 1.243 1.792femaleB SE Wald df Sig. Exp(B) Lower Upper

95.0% CI for Exp(B)

The hazard of partnering at age t is 1.5 times higher for women than for men.

So women partner at an earlier age than men.

We assume that the gender difference in the hazard is the same forall ages.

Page 20: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

20

Discrete-time Event History Analysis

• Event times are often measured in discrete units of time, e.g. months or years, especially when collected retrospectively

• Before fitting a discrete-time model we must restructure the data so that we have a record for each time interval

Page 21: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

21

Discrete-time Data Structure

i yi ci 1 21 1 2 33 0 i t yi(t) 1 16 0 1 17 0 . . . 1 20 0 1 21 1 2 16 0 2 17 0 . . . 2 32 0 2 33 0

Page 22: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

22

Discrete-time Model

The response variable for a discrete-time model is the binary indicator of event occurrence yi(t).

The hazard function is the probability that yi(t)=1.

Fit a logistic regression model of the form:

ii

i xtthth

)()(1

)(log

Page 23: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

23

Discrete-time Analysis of Age at 1st Partnership

FEMALE Respondent’s sex (1=female, 0=male)

FULLTIME(t) Whether in full-time education at age t (1=yes, 0=no)

α(t) fitted as quadratic function by including t and t2 as explanatory variables (after examining plot of hazard)

Page 24: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

24

Results

Variables in the Equation

.922 .149 38.224 1 .000 2.514

-.018 .003 34.461 1 .000 .982

.469 .102 21.014 1 .000 1.598

-1.128 .186 36.717 1 .000 .324

-13.037 1.743 55.918 1 .000 .000

t

t2

female

fulltime

Constant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: t, t2, female, fulltime.a.

Exp(B) are effects on the log-odds of partnering at age t

Women partner more quickly than men.

Enrolment in full-time education is associated with a delay in partnering.

Page 25: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

25

Non-proportional Hazards

• So far we have assumed that the effects of x are the same for all values of t

• It is straightforward to relax this assumption in a discrete-time model by including interactions between x and t in the model

• The following graphs show the predicted log-odds of partnering from 2 different models: 1) the ‘main effects’ model on the previous slide, 2) a model with interactions t*female and t2*female added.

Page 26: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

26

Proportional Gender Effects

15 20 25 30 35Age

-3.00

-2.50

-2.00

-1.50

-1.00

Lo

g-o

dd

s o

f p

art

ne

rin

g

female0

1

Page 27: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

27

Non-proportional Gender Effects

15 20 25 30 35Age

-3.00

-2.50

-2.00

-1.50

-1.00

Lo

g-o

dd

s o

f p

art

ne

rin

g

female0

1

Page 28: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

28

Further Topics

• Repeated events, e.g. multiple marriages or births

• Competing risks, e.g. different reasons for leaving a job (switch to another job, redundancy, sacked)

• Multiple states, e.g. may wish to model transitions between unpartnered, marriage and cohabitation states

• Multiple processes, e.g. joint modelling of partnership and education histories

Page 29: What is Event History Analysis? Fiona Steele Centre for Multilevel Modelling University of Bristol

29

Some References

Singer, J.D. and Willet, J.B. (1993) “It’s about time: Using discrete-time survival analysis to study duration and the timing of events.” Journal

of Educational Statistics, 18: 155-195.

Blossfeld, H.-P. and Rohwer, G. (2002) Techniques of Event History Modeling.

Mahwah (NJ): Lawrence Erlbaum.

Steele, F., Goldstein, H. and Browne, W. (2004) “A general multistate competing risks model for event history data, with an application to a study of contraceptive use dynamics.” Journal of Statistical Modelling, 4: 145-159.