1 / 61

Survival Analysis: An Introductory Course

Survival Analysis: An Introductory Course. Scott Harris October 2009. Learning outcomes. By the end of this session you should: know when to apply survival methods; understand how to use the survival techniques in SPSS and the differences between them;

rayburn
Download Presentation

Survival Analysis: An Introductory Course

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. Survival Analysis:An Introductory Course Scott HarrisOctober 2009

  2. Learning outcomes By the end of this session you should: • know when to apply survival methods; • understand how to use the survival techniques in SPSS and the differences between them; • be able to produce and interpret life tables; • be able to produce and interpret Kaplan-Meier curves;

  3. Contents • Introduction • When/why use survival analysis. • Types of survival/time to event data. • Life table analysis • Producing life tables by hand. • Producing life tables in SPSS. • Kaplan-Meier • Producing Kaplan-Meier plots in SPSS. • Comparison of Kaplan-Meier survival curves (Log-rank test) in SPSS.

  4. Dataset 1: Typical survival dataset Not all survival times known (Limited follow-up)

  5. Survival analysis? • Potentially missing values • Lost to follow-up • Withdrew from study • Limited duration of follow-up • Some patients still alive – yet to experience the event of interest (death) • Comparative analysis • Survival analysis methods

  6. Dataset 2 Beijing, 100m final:

  7. Survival analysis? (Time to event) • Potentially missing values • Disqualified • Injured • Short duration of follow-up • Everyone who finishes will have a time • Comparative Analysis (JAM vs. Other ) • Survival Methods possible but... • Independent samples t test (Normal) • Mann-Whitney test (Non parametric)

  8. When to use survival methods? • Time to event data • Duration between treatment and death • Time from admission to successful discharge from hospital • Time from starting a diet to losing 10 lbs. • Time from release to watching the new Harry Potter film • The event may or may not happen: • Ever (some people will die in hospital before being discharged) • In the time period concerned (limited follow-up)

  9. Censoring Censoring occurs when we have missing information. • Left Censoring: Unclear on exact start of monitoring • Missing date of birth • Unknown date of starting treatment • Experiences event before inclusion in study • Right censoring: Some individuals may not be observed for the full time to event • Loss to follow-up • Drop out • Termination of study / follow-up

  10. Right censoring Earliest event Key Event Censored time Subject Actual event may occur here but having stopped follow-up earlier this would be missed. Study start End of follow-up No event but no more follow-up Time (days)

  11. Right censoring – Staggered start Quickest event Key Event Censored time Subject Actual event may occur here but having stopped follow-up earlier this would be missed. Study start End of follow-up No event but no more follow-up Time (days)

  12. The Example Dataset

  13. SPSS – Survival time data In SPSS (as with other packages) we require the following two variables when dealing with survival time data: • A continuous time variable that measures the time until either the event or the individuals withdrawal (censoring). • A categorical variable that acts as an indicator for whether the subject experienced the event of interest or whether they did not and were censored.

  14. Example dataset • Time to event data for two groups (Group A and Group B): Coded 1 and 2 respectively. • Time in days until event or until end of follow-up. • Whether the individual has had the event of interest (‘No event’ and ‘Event’): Coded 0 and 1 respectively. • The age of the individual at the start of the study.

  15. Example dataset

  16. SPSS – Example dataset

  17. SPSS – Example dataset: Labelled

  18. SPSS – Calculating the Time Transform  Compute Variable… Calculating the Time in days . COMPUTE Time = DATEDIFF(LastDate,StartDate,"Days") . EXECUTE .

  19. Info: Creating new variables in SPSS • From the menus select ‘Transform’  ‘Compute…’. • Enter the name of the new variable that you want to create into the ‘Target Variable:’ box. • Enter the formula for the new variable into the ‘Numeric Expression’ box. • In this case we just want to create the difference between two date variables. To do this we need to make use of the date functions. Select ‘Date Arithmetic’ and then ‘Datediff’ from the boxes on the right. Then we need to replace the question marks with the relevant information as indicated by the function help in the middle of the window. In this case ‘DATEDIFF(LastDate,StartDate,"Days")’ was entered in the ‘Numeric Expression’ box. • Finally click ‘OK’ to produce the new variable or ‘Paste’ to add the syntax for this into your syntax file.

  20. SPSS – Example dataset: Complete

  21. Practical QuestionsSurvival AnalysisQuestion 1

  22. Practical: Download & Setup From the course webpage download the two SPSS datasets that will be used for the practical's by clicking the right mouse button on the file name and selecting Save Target As. The two datasets are: • Survival_Ex1.sav (The example dataset used in the slides) • BC_Survival.sav (A dataset on Breast cancer survival: Data are from the Mayo clinic) • Open up both of the datasets in SPSS. • Calculate the Time variable for the Survival_Ex1.sav dataset.

  23. Life Table Analysis

  24. Life table analysis • The simplest form of survival analysis • Generally the quickest to do by hand • Split the time variable into X categories • One set of calculations for each time category • Most easily done in a table structure, hence the name

  25. Theory: Life table analysis • For Each time category: • No. Entering: Subjects entering (NE) • No. withdrawing : Subjects withdrawing (NW) • At risk: • Events: Number of events (Number of failures)

  26. No . Failures AR Theory: Life table analysis • For Each time category: • Proportion failing: • Proportion surviving: • Cumulative Survival: Proportion surviving at time point i. Cumulative proportion at time point i (current) Cumulative proportion at time point i-1 (previous)

  27. Theory: Life table analysis Group A life table 1/8 = 0.125 1 – 0.125 = 0.875 8 – 0/2 = 8 1 – 0.5 = 0.5 0.5 x 0.875 = 0.438 3/6 = 0.5 7 – 2/2 = 6

  28. Life table analysis Group A life table

  29. SPSS – Life table analysis Analyze  Survival  Life Tables…

  30. SPSS – Life table analysis * Calculating the life table . SURVIVAL TABLE=Time BY Group(1 2) /INTERVAL=THRU 40 BY 10 /STATUS=Status(1) /PRINT=TABLE .

  31. Info: Life table analysis in SPSS • From the menus select ‘Analyze’  ‘Survival’  ‘Life Tables…’. • Put the variable containing the time into the ‘Time:’ box. Decide on the period of time to group together and put this into the ‘by’ box of the ‘Display Time Intervals’ box. The first value to go into the ‘Display Time Intervals’ box has to be a multiple of the value in the ‘by’ box as well as being greater than the longest time recorded in your dataset. • Put the categorical variable, that indicates whether a case had the event of interest or not into the ‘Status:’ box. Then click the ‘Define Event…’ button and enter the single value or range of values that all indicate that the event occurred. Click ‘Continue’. • If you want separate results for each level of a categorical variable then put this variable into the ‘Factor:’ box. Click the ‘Define Range…’ box and then enter the numeric codes for the minimum and maximum of the groups that you want to compare. Click ‘Continue’. • Finally click ‘OK’ to produce the test results or ‘Paste’ to add the syntax for this into your syntax file.

  32. The same values as were calculated by hand SPSS – Life table analysis : Output

  33. Practical QuestionsSurvival AnalysisQuestion ?2? and 3

  34. Practical Questions • Calculate the Life table values for Group B from the example dataset by hand, using the skeleton table below:

  35. Practical Questions The file BC_Survival.sav contains data on 1207 women who were diagnosed with breast cancer. • Produce a Life table for this data, separating those women for whom the cancer had infected the lymph nodes from those for whom it had not (ln_yesno). Split the survival time into yearly periods.

  36. Practical Solutions • The life table for Group B should look like this:

  37. Practical Solutions: Instructions • To produce the Life table you will need syntax similar to the following: * Producing the Life table . SURVIVAL TABLE=time BY ln_yesno(0 1) /INTERVAL=THRU 144 BY 12 /STATUS=status(1) /PRINT=TABLE .

  38. Practical Solutions: Output

  39. Practical Solutions: Output

  40. Kaplan-Meier

  41. Kaplan-Meier • Rather than categorising, we can estimate the survival function directly from the continuous survival times. • Imagine creating a life table so that each time interval contains exactly one case. Multiplying these survival probabilities across the intervals gives what is known as the Kaplan-Meier product limit estimator.

  42. SPSS – Kaplan-Meier Analyze  Survival  Kaplan-Meier… (Just looking at Group A) There is a filter in place to limit the results to those from Group A alone.

  43. SPSS – Kaplan-Meier * KM plot for just Group A . KM Time /STATUS=Status(1) /PRINT TABLE MEAN /PLOT SURVIVAL .

  44. Info: Kaplan-Meier in SPSS • From the menus select ‘Analyze’  ‘Survival’  ‘Kaplan-Meier…’. • Put the variable containing the time into the ‘Time:’ box. • Put the categorical variable, that indicates whether a case had the event of interest or not into the ‘Status:’ box. Then click the ‘Define Event…’ button and enter the single value or range of values that all indicate that the event occurred. Click ‘Continue’. • If you want separate curves and results for each level of a categorical variable then put this variable into the ‘Factor:’ box. • Click the ‘Options’ button and tick the ‘Survival’ option in the ‘Plots’ box. Click ‘Continue’. • Finally click ‘OK’ to produce the test results or ‘Paste’ to add the syntax for this into your syntax file.

  45. Calculated proportion with no event at each time point Information for each individual subject in order of length of follow-up Total number of events SPSS – Kaplan-Meier: Output - values

  46. SPSS – Kaplan-Meier: Output - plot

  47. SPSS – Kaplan-Meier: Output - plot Can also mark where censored observations occur (not advisable for large datasets)

  48. The last few plots are not from SPSS but come from another statistical package: Stata. The default KM plot from SPSS (shown here) is ok but generally needs a bit of tidying up within the SPSS graph editor. As you can see the plot does not automatically start from the top left corner (100% survival at time 0). It starts from the time of the first event, which is not ideal. You may also notice the time axis (x axis) does not start from 0 although this is easily altered. SPSS – Kaplan-Meier

  49. Log-rank test • Allows for comparison between groups. • Possible to compute by hand (based on Chi-square). • ‘Just another option’ when using a Statistics package. • Other options for comparison include the Breslow and Tarone-Ware tests. H0: No difference between the groups. H1: The groups are different.

  50. SPSS – Log-rank test Having removed the filter, but leaving the other options the same as the previous KM setup you only need to add a Factor variable and then select another option for the Log rank test. * Comparative KM plot with log-rank test . KM Time BY Group /STATUS=Status(1) /PRINT TABLE MEAN /PLOT SURVIVAL /TEST LOGRANK /COMPARE OVERALL POOLED .

More Related