1 / 72

Dr. N. Birkett, Department of Epidemiology & Community Medicine, University of Ottawa

EPI 5344: Survival Analysis in Epidemiology Parametric Methods: exponential and related March 11, 2014. Dr. N. Birkett, Department of Epidemiology & Community Medicine, University of Ottawa. Objectives. Introduce the Accelerated Failure Time model The simple exponential model and MLE

cate
Download Presentation

Dr. N. Birkett, Department of Epidemiology & Community Medicine, University of Ottawa

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EPI 5344:Survival Analysis in EpidemiologyParametric Methods: exponential and relatedMarch 11, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine, University of Ottawa

  2. Objectives • Introduce the Accelerated Failure Time model • The simple exponential model and MLE • Iterative methods to estimate MLEs • The piece-wise exponential model. • Using likelihood ratio methods to compare models

  3. Intro (1) • Parametric methods are not commonly used in epidemiology • Exponential and piece-wise exponential are exceptions. • Based on an Accelerated Failure Time (AFT) model • Like saying that one year of a dog’s life counts as 7 human years.

  4. Intro (1a) • The time at which survival in my study group is the same as survival in the reference group at time ‘t0’ is: • Survival in my study group at time ‘t’ is the same as survival in the reference group at time ‘R*t’:

  5. TR = 2.0 Curve 1 has longer survival Curve 2 Curve 1

  6. Intro (2) • We model the ‘event time’ directly:

  7. Intro (3) • Similar to linear regression (show on board) • εi is a random variable • assumed constant mean and variance over all subjects • can assume any of a range of distributions • Normal Dist’n  ‘T’ follows log-normal dist’n • σ is scale parameter • Can be used to test assumptions about shape of εi • ‘Scales’ random error distribution

  8. Intro (4) • AFT and PH assumptions are separate • Some models have both properties but most don’t • exponential and Weibull are both AFT and PH • Time Ratio (TR) and Hazard Ratio (HR) • TR gives the increase in survival time for exposures • HR gives the increase in hazard (risk) • If TR is >1.0, HR will be <1.0 • Can convert between them if we know the math • SAS use Proc Lifereg to fit parametric models

  9. Exponential Model (1) • Hazard is constant:

  10. Exponential Model (2) • Consider two groups with exponential survival: • How does the survival of group 1 relate to group 0? Accelerated Failure Time Model

  11. Exponential Model (3)

  12. Exponential Model (4) • The AFT models and PH model with constant hazard are equivalent • Beta from one model is negative of beta from other model • Doesn’t matter if we use hazard or AFT approach • I will stick with hazards • For constant hazard model, εi is the ‘Extreme value’ distribution

  13. Exponential Model (5) • If HR >1, then study group has events which happen earlier in time • Same effect as TR<1 • Since hazard is constant, then we have:

  14. Exponential Model (6) • How do we estimate λ? • Use MLE • Means that we need a likelihood function • Slightly different from previous session since we have continuous distributions • Prob(event time=any ‘t’) = 0 • Instead, use the probability density function • f(t)

  15. Exponential Model (7) • Two types of events (ends) can happen: • Death • Censored • Each contribute to the likelihood function but in different ways

  16. Exponential Model (8) • Likelihood contribution of a death at time ti: • Likelihood contribution if censored at time : • Actual time of ‘failure’ is unknown. • Must survive until at least time • Multiply these across all deaths and all censored events to get full likelihood

  17. Exponential Model (9)

  18. Exponential Model (10) • How do we find the MLE for λ?

  19. Exponential Model (11) • How can we check if the data follows the exponential model? • This gives a straight-line y=a+bx. Where:

  20. Exponential Model (12) • Complementary log-log plot • Plot ‘log(-log(S(t))’ vs. ‘log(t)’ • Look for a straight line. • Later on, this plot will prove very useful for testing proportional hazard assumption.

  21. Exponential Model (13) • What if we want to examine predictors of the outcome? • λ is allowed to vary by sex, age, cholesterol, etc. • Use the same approach but now, instead of a fixed ‘λ’, we use the following in the likelihood function:

  22. Exponential Model (14) • We need to find an MLE for each of the Betas. • There is NO closed form formula to solve this case! • Must use iterative methods to estimate each of the Betas. • Approach used in ALL real MLE-based analyses • Computers are very good at doing this.

  23. Guess #3 Guess #1 Guess #2

  24. Exponential Model (15) • Real algorithm is more sophisticated. • Usually converges in 4-5 steps. • HOWEVER, it: • May take longer or • May never converge

  25. Uses recidivism data set libname allison 'C:/allison_2010/data_sets'; ODS GRAPHICS ON; ods rtf; PROC LIFEREG DATA=allison.recid; MODEL week*arrest(0)=fin age race wexp mar paro prio / DISTRIBUTION=exponential; RUN; ODS rtf close; ODS GRAPHICS OFF;

  26. How do we interpret this?

  27. Financial aid effect • Seems to imply financial aid makes things worse! • But, last week we found that financial aid reduced the rate of recidivism. • This is NOT the hazard ratio. • LIFEREG gives the Time Ratio.

  28. What is this?

  29. Lagrange Multiplier section • Formally, tests if the ‘scale’ parameter (σ) is ‘1’ • ‘σ’ relates to Weibull distribution • If ‘σ’=1, Weibull becomes the exponential. • If ‘σ’≠1, then hazard is not constant over time. • Informally, use this as a test that the hazard is constant.

  30. ‘CLASS’ statement in SAS (1) • Education measures highest grade completed. • Grouped into five levels: • 6th grade or lower • 7th to 9th grade • 10th to 11th grade • 12th grade • some college • Coded as 2/3/4/5/6

  31. ‘CLASS’ statement in SAS (2) • How to model? • Include in ‘model’ statement • treated as continuous • same change in risk from level 2 to 3 as from 5 to 6, etc. • not a good approach. • ordinal variable • include as dummy variables • Could code yourself in a Data step • Better: use the ‘class’ statement in SAS

  32. libname allison 'C:/allison_2010/data_sets'; ODS GRAPHICS ON; ods rtf; PROC LIFEREG DATA=allison.recid; CLASS educ; MODEL week*arrest(0)=fin educ / DISTRIBUTION=exponential; RUN; ODS rtf close; ODS GRAPHICS OFF;

  33. Exponential Model (16) • Exponential is only one model • Could also use: • Weibull • log-normal • log-logistic • Gamma • etc.

  34. Piecewise Exponential Model (1) • Hazard is rarely constant over follow-up time • A better approximation can be found using piecewise exponential models • Divide follow-up time into intervals • The hazard is assumed constant within interval • Can vary between intervals. • Useful in the ‘real world’ where event times are often not very precisely known

  35. Piecewise Exponential Model (2) • Lifereg allows you to test hypotheses about the hazard directly. • Start by dividing follow-up time into a set of ‘J’ intervals (they need not be the same size) • Cut-points:

  36. a2 a3 a4 a0 a1

  37. Piecewise Exponential Model (3) • The hazard for individual ‘i’ is of the form: • Or, we could write: • Where: • This is the same as the exponential model except that the hazard is allowed to vary during follow-up time • If we include some predictors, model becomes:

  38. Piecewise Exponential Model (4) • The hazard for individual ‘i’ is of the form: • Or, we could write: • Where: • Easy to estimate these models with SAS. • Need data in the ‘right’ format

  39. Piecewise Exponential Model (5) • To-date, data has one record per subject. • Each record contains • Time of event • Type of event • Covariates • For piece-wise model, each subject needs one record for each interval. • Time spent interval • Type of event in this interval • Covariates

  40. Recidivism data (first 9cases) Obs week arrest fin age race wex mar paro prio 1 20 1 0 27 1 0 0 1 3 2 17 1 0 18 1 0 0 1 8 3 25 1 0 19 0 1 0 1 13 4 52 0 1 23 1 1 1 1 1 5 52 0 0 19 0 1 0 1 3 6 52 0 0 24 1 1 0 0 2 7 23 1 0 25 1 1 1 1 0 8 52 0 1 21 1 1 0 1 4 52 0 0 22 1 0 0 0 6 • Allow hazard to vary in each quarter of the year: • 0-12+ • 13-25+ • 26-38+ • 39-51+ • Need to re-structure table to give one record per subject per quarter. • Ignore covariates for now • Consider subject #1

  41. Piece-wise Exponential Model (6) • Subject was re-arrested in week 20 • Quarter #2. • What will the new data look like? • One record for quarters 1 & 2. • No record for quarters 3 & 4

  42. Recidivism data (first 9cases) Obs week arrest fin age race wex mar paro prio 1 20 1 0 27 1 0 0 1 3 2 17 1 0 18 1 0 0 1 8 3 25 1 0 19 0 1 0 1 13 4 52 0 1 23 1 1 1 1 1 5 52 0 0 19 0 1 0 1 3 6 52 0 0 24 1 1 0 0 2 7 23 1 0 25 1 1 1 1 0 8 52 0 1 21 1 1 0 1 4 52 0 0 22 1 0 0 0 6

  43. Piece-wise Exponential Model (7) • Subject was never re-arrested. • What will the new data look like? • One record for each quarter

  44. Piece-wise Exponential Model (8) • Main challenge is technical • How to re-structure the SAS data set? • How to describe new data layout to SAS?

  45. Piece-wise Exponential Model (9) DATA quarter; SET allison.recid; quarter=CEIL(week/13); DO j=1 TO quarter; time=13; event=0; IF (j=quarter AND arrest=1) THEN DO; event=1; time=week-13*(quarter-1); END; OUTPUT; END; RUN;

More Related