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

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

Upload: christiana-carroll

Post on 14-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

What is Event History Analysis?

Fiona SteeleCentre 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

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

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

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

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

• Usually assume censoring is non-informative

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).

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

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

10

Estimation of S(t)

Estimator of survivor function for interval t is

)]1(ˆ1[)1(ˆ

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

thtS

thhhtS

E.g. probability of surviving to the start of 3rd interval= probability no event in 1st interval and no event in 2nd interval

)]2(ˆ1[)]1(ˆ1[)3(ˆ hhS

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

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

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)

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)

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:

16

The Cox Proportional Hazards Model

• Makes no assumptions about the shape of the hazard function

• Treats time as a continuous variable

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

The most commonly applied model which:

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)

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

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.

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

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

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

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)

We need to choose the form of α(t). Try:

• step function (dummy variable for each year age 16-33)• quadratic function by including t and t2

Choice will be guided by plot of the hazard function.

24

Duration Effects Fitted as a Step FunctionVariables in the Equation

53.664 17 .000

.134 .433 .096 1 .756 1.144

.705 .409 2.969 1 .085 2.024

1.097 .406 7.290 1 .007 2.996

1.209 .407 8.825 1 .003 3.351

1.517 .404 14.120 1 .000 4.558

1.441 .419 11.827 1 .001 4.225

1.308 .429 9.303 1 .002 3.700

1.367 .435 9.869 1 .002 3.922

1.477 .440 11.265 1 .001 4.382

1.399 .453 9.519 1 .002 4.051

1.597 .458 12.130 1 .000 4.937

1.498 .480 9.755 1 .002 4.475

1.280 .511 6.268 1 .012 3.596

1.704 .503 11.502 1 .001 5.497

1.072 .588 3.325 1 .068 2.922

.455 .718 .401 1 .526 1.575

-.620 1.087 .325 1 .569 .538

.468 .102 20.929 1 .000 1.597

-1.133 .197 33.112 1 .000 .322

-3.129 .395 62.729 1 .000 .044

t

t(1)

t(2)

t(3)

t(4)

t(5)

t(6)

t(7)

t(8)

t(9)

t(10)

t(11)

t(12)

t(13)

t(14)

t(15)

t(16)

t(17)

female

fulltime

Constant

Step1

a

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

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

Referencecategory for t=age 16

25

Duration Effects Fitted as a Quadratic

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 (1-0.324)100=68% reduction in the odds of partnering, i.e. a delay

26

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.

27

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

28

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

29

Further Topics

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

– Multilevel modelling

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

– Fit set of logistic regression models or a single multinomial model

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

– Include dummies for state, and interact with duration and covariates

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

30

Some ReferencesSinger, 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. (2005) Event History Analysis. NCRM Review Paper NCRM/004.

Downloadable from http://www.ncrm.ac.uk/publications/index.php.

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.