as07

28
Further issues for Cox regression (AS07) EPM304 Advanced Statistical Methods in Epidemiology Course: PG Diploma/ MSc Epidemiology This document contains a copy of the study material located within the computer assisted learning (CAL) session. If you have any questions regarding this document or your course, please contact DLsupport via [email protected] . Important note: this document does not replace the CAL material found on your module CDROM. When studying this session, please ensure you work through the CDROM material first. This document can then be used for revision purposes to refer back to specific sessions. These study materials have been prepared by the London School of Hygiene & Tropical Medicine as part of the PG Diploma/MSc Epidemiology distance learning course. This material is not licensed either for resale or further copying. © London School of Hygiene & Tropical Medicine September 2013 v2.0

description

stats notes

Transcript of as07

  • Further issues for Cox regression (AS07)

    EPM304 Advanced Statistical Methods in Epidemiology

    Course: PG Diploma/ MSc Epidemiology

    This document contains a copy of the study material located within the computer assisted learning (CAL) session. If you have any questions regarding this document or your course, please contact DLsupport via [email protected]. Important note: this document does not replace the CAL material found on your module CDROM. When studying this session, please ensure you work through the CDROM material first. This document can then be used for revision purposes to refer back to specific sessions. These study materials have been prepared by the London School of Hygiene & Tropical Medicine as part of the PG Diploma/MSc Epidemiology distance learning course. This material is not licensed either for resale or further copying.

    London School of Hygiene & Tropical Medicine September 2013 v2.0

  • Section 1: Further issues for Cox regression Aim

    To review Cox regression, and learn how to check whether the effect of an exposure is constant over time, the proportional hazards assumption.

    Objectives By the end of this session you will be able to:

    explain how Cox regression estimates rate ratios understand the importance of checking the assumption of proportionality for

    Cox regression use graphical methods to assess the proportionality of an effect of an

    exposure formally test for proportional hazards, i.e. constant exposure effect over time know how to deal with non-proportionality present results from the analysis of survival data.

    This session should take you between 1 and 2 hours to complete. Section 2: Planning your study In a previous session you took an in-depth look at Poisson regression. Poisson regression is applied when the rate is assumed to be constant over a period of time. However, when the rate of an event is changing more rapidly with time, the appropriate model to use is Cox regression. In this session you will review Cox regression and consider in detail the assumption of proportionality, how to assess it and what to do if it is violated. To work through this session you should know about survival analysis and regression models, specifically Cox regression. If you need to review any materials before you continue refer to the appropriate sessions below. Survival analysis SM03 Cox regression SM11 and AS06 Interaction: Hyperlink: SM03: SM03 session opens Interaction: Hyperlink: SM11 SM11 session opens 2.1: Planning your study

  • To illustrate methods in this session the example below is used. Click on the example to see further details below. Study of risk factors for mortality among males in Trinidad Interaction: Hyperlink: Study of risk factors for mortalityamong males in Trinidad (card appears on RHS): All males aged 3574 years who were living in two neighbouring suburbs of Port of Spain, Trinidad, in March 1977 were eligible and entered into the study. Baseline data were recorded for 1,343 men on a range of risk factors including ethnic group, cigarette and alcohol consumption. All subjects were then visited annually at home, and morbidity and mortality records were compiled. Regular inspection of hospital records, death registers and obituaries were also used to update the records. Those who had moved away (or abroad) were contacted annually by postal questionnaire and were also seen if they returned to Port of Spain. Follow-up of the study cohort finished at the end of 1987, giving a study period of ten years.

    Section 3: Cox regression Rates and intervals of time We apply the Poisson model to situations where there are relatively large intervals of time and it is assumed that rates are constant within each interval. To adjust for rates that change rapidly with time, a Cox model is used. A Cox model is based on very small intervals of time, called timeclicks, which contain at most 1

  • event. This produces a constant rate within each very small interval but also allows the rate to vary over longer time intervals. So, for rapidly changing rates Cox is the appropriate model.

    3.1: Cox regression The Cox regression model A simple Cox regression model that describes the effect of one exposure can be written: Rate = Baseline rate x Exposure Changes with time The Baseline rate is the rate in the unexposed group that changes from one small interval to the next, the changing baseline rate. Exposure is the effect of the exposure, i.e., the rate ratio of the exposed compared to the unexposed. Both parameters are used to describe the model, however it is only the effect of exposure that is estimated.

    In Cox regression (survival analysis) a rate is more commonly referred to as a hazard. Similarly, instead of rate ratio, the term hazard ratio is used. We will refer to hazards and hazard ratios throughout this session. Hazards and hazard ratios are measured within a timeclick.

  • Click below to see a plot of the Cox model. Interaction: Button: Swap:

    3.2: Cox regression The proportional hazards assumption The assumption on which Cox regression is based is that the effect of exposure is proportional over time. In other words the ratio of the rate for the exposure group compared to the changing baseline rate must be constant over time. This is known as the proportional hazards assumption.

    3.3: Cox regression Two exposures of interest in the Trinidad study of mortality risk factors were 'CHD at entry' and smoking. Both are binary variables, and the Cox model can be written:

  • Rate = Baseline rate x CHD at entry x smoking The estimated hazard ratios from a Cox regression for 'CHD at entry' and smoking from the Trinidad study are shown below.

    Hazard Ratio

    Standard Error

    z P > |z|

    95% confidence interval

    chdstart 2.941054 1.56806 2.023 0.043 1.034366 8.362418 smoking 1.302129 0.6427479 0.535 0.593 0.4948687 3.426243 Log likelihood = 415.77239 3.4: Cox regression The survival curves for 'CHD at entry' and smoking in the Trinidad study of mortality risk factors are shown on the tabs below. Interaction: Tabs: CHD at entry

    Interaction: Tabs: Smoking:

  • 3.5: Cox regression Consider the estimates from Cox regression shown below. The estimates of effect are hazard ratios. What is the null hypothesis of the Wald test for smoking? Choose from the options shown below. Hazard

    Ratio Standard Error

    z P > |z| 95% confidence interval

    chdstart

    2.941054

    1.56806

    2.023 0.043 1.034366

    8.362418

    smoking

    1.302129

    0.6427479

    0.535 0.593 0.4948687

    3.426243

    Log likelihood = 415.77239

    Interaction: Hotspot: The hazard ratio for the effect of smoking does not change over time:

    The baseline rate for the non-smoking group is constant

    The rate of deaths, adjusted for 'CHD at entry', in men who smoke, is the same as the rate of deaths in men who do not smoke, i.e. the hazard ratio = 1.

    The hazard ratio for the effect of smoking does not change over time

  • Incorrect Response (pop up box appears):

    Interaction: Hotspot: The baseline rate for the non-smoking group is constant: Incorrect Response (pop up box appears):

    Interaction: Hotspot: The rate of deaths, adjusted for 'CHD at entry', in men who smoke, is the same as the rate of deaths in men who do not smoke, i.e. the hazard ratio = 1.: Correct Response (pop up box appears):

    Section 4: The proportionality assumption The fundamental assumption of Cox regression is that the ratio of the rate for an exposed individual compared to the rate for a subject with baseline characteristics is constant throughout the follow up time.

    i (t,i) = (constant over time) (t,0)

    This means that the variation over time for any individual is the same as the variation in the baseline.

  • 4.1: The proportionality assumption The proportional hazards assumption means that the estimates for an exposure effect do not change throughout the study period. This proportional hazards assumption is equivalent to the assumption of no interaction that is used in a Poisson regression specifically, no interaction with time. In fact, when we test this assumption it is similar to a test for interaction. Interaction: Button: More: In a Poisson model this is called the multiplicative rates assumption. Can you remember how you would check whether this assumption is valid in a Poisson model? Interaction: Button: clouds picture (pop up box appears): In a Poisson model you can check the multiplicative rates assumption by testing the significance of an interaction between the effect of interest and the time variable. 4.2: The proportionality assumption With Cox regression it is not possible to test the significance of an interaction between the effect of interest and the time variable. Why do you think this is? Choose from the boxes below:

    It is not possible to have interaction parameters in Cox regression

    Estimates for the time variable are not given in Cox regression

  • Interaction: Hotspot: It is not possible to have interaction parameters in Cox regression: Incorrect Response (pop up box appears): No, it is possible to have interactions between two exposures of interest but not with the time variables because no estimates are given. We know there is a changing baseline but do not estimate this. Interaction: Hotspot: Estimates for the time variable are not given in Cox regression: Correct Response (pop up box appears and card appears on RHS): Correct That's right, we cannot test the significance of the interaction between the exposure of interest and the time variable because parameters for the time variable are not estimated. We know there is a changing baseline but do not estimate this. Interaction: Hotspot: In Cox regression, the rate is changing too rapidly to test such an interaction: Incorrect Response (pop up box appears): No, although the purpose of Cox regression is to model rapidly changing rates, the reason we cannot test the interaction between the exposure of interest and the time variable is because parameters for the time variable are not estimated. There are several alternatives to an interaction test in order to assess the validity of the proportional hazards assumption. On the next 2 pages you will look at: 1. A graphical assessment 2. A formal statistical assessment Section 5: Graphical assessment of proportionality In assessing the relationships over time in your data the question you are asking is:

    Q: Can I assume the effect of exposure is constant throughout follow-up?

    Forget about Cox regression to begin with and think back to a classical method for survival analysis, namely Kaplan-Meier estimates and survival curves.

    In Cox regression, the rate is changing too rapidly to test such an interaction

  • This is a non-parametric method and therefore makes few assumptions about your data. To illustrate how you can assess whether the proportional hazards assumption is valid you will use the Trinidad study of mortality risk factors. The focus is on whether there is a change in the effect of an exposure over time. 5.1: Graphical assessment of proportionality The life table for men in the Trinidad study with 'CHD at entry' is shown below. Click 'swap' to see the table for men without 'CHD at entry'. Interaction: Button: Swap (the table on the centre bottom changes to below): Life table for men without CHD at entry Interval Total Death

    s Lost Survi

    val Std

    Error [95% Conf.

    Int.] 0 1 252 7 0 0.972

    2 0.010

    4 0.942

    6 0.986

    7 1 2 245 5 0 0.952

    4 0.013

    4 0.917

    7 0.972

    7 2 3 240 5 1 0.932

    5 0.015

    8 0.893

    7 0.957

    5 3 4 234 10 1 0.892

    6 0.019

    5 0.847

    2 0.925

    0 4 5 223 10 1 0.852

    4 0.022

    4 0.802

    2 0.890

    8 5 6 212 4 18 0.835

    7 0.023

    5 0.783

    5 0.876

    2 6 7 190 2 23 0.826

    3 0.024

    1 0.772

    9 0.868

    2 7 8 165 11 21 0.767

    5 0.028

    2 0.706

    5 0.817

    4 8 9 133 4 73 0.735

    6 0.031

    2 0.668

    7 0.791

    2 9 10 56 1 55 0.709

    8 0.039

    4 0.624

    6 0.779

    1 Life table for men with CHD at entry Interval Total Death

    s Lost Survi

    val Std

    Error [95% Conf.

    Int.] 0 1 38 3 0 0.921

    1 0.0437

    0.7749

    0.9738

    1 2 35 2 0 0.8684

    0.0548

    0.7123

    0.9430

    2 3 33 2 0 0.8158

    0.0629

    0.6521

    0.9076

    3 4 31 3 0 0.7368

    0.0714

    0.5661

    0.8488

  • 4 5 28 2 0 0.6842

    0.0754

    0.5115

    0.8067

    5 6 26 0 3 0.6842

    0.0754

    0.5115

    0.8067

    6 7 23 2 3 0.6206

    0.0807

    0.4430

    0.7561

    7 8 18 0 6 0.6206

    0.0807

    0.4430

    0.7561

    8 9 12 1 6 0.5516

    0.0968

    0.3462

    0.7163

    9 10 5 0 5 0.5516

    0.0968

    0.3462

    0.7163

    From these tables it is possible to compare the pattern of survival. 5.2: Graphical assessment of proportionality A more simple comparison of survival patterns is possible with survival curves. The Kaplan-Meier survival curves for men with and without 'CHD at entry' are shown below. If the proportionality assumption is met, there should be a steadily increasing difference between the two curves. Consider the curves below. What can you conclude about the effect of 'CHD at entry' on survival during the study? Interaction: Button: clouds picture (pop up box appears): Survival for men with 'CHD at entry' is always less than for men without 'CHD at entry'. The curves gradually diverge as follow-up time increases. This suggests that the proportional hazards assumption is valid, i.e. the effect of 'CHD at entry' is constant throughout the study period.

  • 5.3: Graphical assessment of proportionality A graphical assessment is subjective and it can sometimes be difficult to make conclusions. However, examination of the log cumulative rate simplifies the process. Let's first consider why, and then go on to look at cumulative incidence rate plots. If the proportional hazards function is valid, then the ratio of the rate for an exposed individual compared to the rate for a baseline individual is:

    i (t,i) = (constant over time) (t,0)

    Click below to continue. Interaction: Button: More: This can be re-written as:

    (t,i) = i

    Interaction: Button: More:

    (t,0)

    Then, summing both sides over time:

    (t,i) = i

    Cumulative hazard ( i ) = i x cumul. hazard ( 0 )

    (t,0)

  • 5.4: Graphical assessment of proportionality So, the cumulative rate for a subject i should be proportional to the cumulative rate of the baseline subject. Therefore, the plots of the baseline cumulative rate and of subject i should have a constant multiplying factor between them. If there is a constant multiplying factor between two rates, what would you expect the plots to look like on a log scale? Interaction: Button: clouds picture (pop up box appears): If the multiplying factor is constant, then on a log scale there will be a constant additive factor. This means the two lines will be parallel, because of the constant addition of log i. log cumulative hazard ( i ) = log i + log cumulative hazard ( 0 ) 5.5: Graphical assessment of proportionality A plot of cumulative hazard is called a Nelson-Aalen curve (after the authors who first proposed such plots). You can see the cumulative incidence curves below, for the Trinidad men with and without 'CHD at entry'. On the second tab are the log cumulative incidence curves. These plots show the cumulative incidence of dying, the inverse of cumulative survival Notice how the line for the cumulative hazard for those without CHD at entry is smoother than that with CHD at entry. This is because there are many more men in the latter group. Interaction: Hyperlink: cumulative survival (pop up box appears): Cumulative survival The product of survival probabilities for intervals of time up to a specific point in time. Interaction: Tabs: Cumulative Hazard:

  • Interaction: Tabs: Log cumulative hazard:

    5.6: Graphical assessment of proportionality Can you assume that the effect of 'CHD at entry' is constant throughout the study? Interaction: Button: clouds picture (pop up box appears):

  • The log cumulative incidence curves can be assumed parallel throughout the study period. You can therefore say that the effect of 'CHD at entry' is constant throughout the follow-up time and the proportional hazards assumption is valid. 5.7: Graphical assessment of proportionality The plot below shows the log cumulative incidence for the effect of smoking. Do you think you could assume the effect of smoking is the same throughout the study? Interaction: Button: clouds picture (pop up box appears): The two curves cross at approximately 2 years of follow-up. In the early years of the study the effect of smoking on mortality was less than non-smoking. However, as follow-up increases the effect of smoking on death rate increases. From these curves you can conclude that the effect of smoking on mortality is not constant over the follow-up period and therefore the proportional hazards assumption is not valid.

    5.8: Graphical assessment of proportionality Before you go on to look at a formal test of the proportional hazards assumption try the exercise below. Select the appropriate word from each drop-down menu in the boxes below to complete the sentence shown.

  • Cox regression is used to model rates that change over time. Parameters for the changing baseline rate are not estimated. The fundamental assumption of Cox regression is that the effect of an exposure is throughout the follow-up period. This is known as the hazards assumption, since the rate for exposure should be proportional to the rate for the baseline. Interaction: Pulldown: Cox regression is used to model rates that change ________ over time.: Correct Response rapidly (pop up box appears): Correct That's right, Cox regression is used to model hazards (rates) that change rapidly over time. Incorrect Response slowly (pop up box appears): No, if we could assume a slowly-changing or constant rate then Poisson regression could be used. Poisson is a simpler model that makes fewer assumptions. Please try again. Incorrect Response unpredictability (pop up box appears): Cox regression might be appropriate in this case, but it is the rate at which the hazard changes over time that is important here. Please try again. Interaction: Pulldown: Parameters for the changing baseline rate are not estimated. The fundamental assumption of Cox regression is that the effect of an exposure is ___________ throughout the follow-up period: Incorrect Response high (pop up box appears): No, the assumption of Cox regression is about how the effect of the exposure changes over time, not about the actual value of the effect. Please try again. Correct Response constant (pop up box appears):

    Correct Yes, the effect of exposure is assumed to be constant throughout the follow-up period. This is necessary because the rates vary rapidly over time and we cannot measure the changing baseline. Therefore we must assume the relationship between the baseline rate and rate in the exposed is constant. Incorrect Response changing (pop up box appears): No, it is the rates that vary rapidly over time, rather than the effect of the exposure. We cannot measure this rapidly changing baseline, so what must be assumed about the effect of exposure? Try again. Interaction: Pulldown: This is known as the __________hazards assumption, since the rate for exposure should be proportional to the rate for the baseline.: Correct Response proportional (pop up box appears):

  • Correct Yes, the assumption of a constant exposure effect throughout the follow-up period means that the effect is constant on a log scale. Therefore, on a hazard scale, the rates will be proportional hence the term proportional hazards. Incorrect Response variable (pop up box appears): The hazards are variable, but that is not what the assumption of constant exposure effect means. The effect is the ratio between the rates (hazards), so what does a constant effect imply? Please try again. Incorrect Response constant (pop up box appears): No, it is the effect that is constant, not the hazards. The effect is the ratio between the rates (hazards), so what does a constant effect imply? Please try again. Section 6: Formal test of proportionality assumption You can conduct a formal test for departure from the proportional hazards assumption by comparing hazard ratios in different intervals of time. Interaction: Button: Show: To do this you first need to split the data into intervals of follow-up. An unbiased way to do this is to choose the intervals so they contain the same number of events. The effect of the exposure is examined in each interval. If the estimates across intervals are significantly different this is evidence that the effect is not constant over the follow-up period and the assumption of proportionality is not valid. Hazard ratio (HR) in 3 time intervals

    Notice the three intervals of time are not equal because they are chosen to contain the same number of events.

  • 6.1: Formal test of proportionality assumption Let's assess the proportionality assumption this way for 'CHD at entry' and smoking in the Trinidad follow-up study. The time of follow-up was from 0 to 10 years. To split the follow-up time into three intervals the time at which events occurred was examined. The time-intervals were chosen so that approximately the same number of events occurred in each interval. This is shown in the table below. Note: You can also split time at a specific point of interest, e.g. in a clinical trial, treatment effect at specific periods may change. Time of follow-up Number of deaths 0 to < 2 years 27 2 to < 5 years 33 5 or more years 28 Total 88 6.2: Formal test of proportionality assumption Let's examine the estimates from a Cox regression for the effect of 'CHD at entry'. Click the blue words below to see the data for each follow-up interval as a table, or as a cumulative hazard plot. 0 to < 2 years: Table Plot 2 to < 5 years: Table Plot 5 or more years: Table Plot Examine the hazard ratio estimates and their confidence intervals, do you think you can assume proportional hazards for 'CHD at entry'? Interaction: Hyperlink: Table( 0 to < 2 years:): Time interval: 0 to < 2 years Variable: Time1 Hazard

    ratio Standard

    error z P < |z| 95% confidence

    interval chdstart 2.907241 1.547554 2.005 0.045 1.024183 8.252478 log likelihood = 94.21821 Interaction: Hyperlink: Plot( 0 to < 2 years:): Time interval: 0 to < 2 years

  • Interaction: Hyperlink: Table( 2 to < 5 years): Time interval: 2 to < 5 years Variable: Time2 Hazard

    ratio Standard

    error z P < |z| 95% confidence

    interval chdstart 2.158332 0.923029 1.799 0.072 0.933458 4.990475 log likelihood = 176.00358 Interaction: Hyperlink: Plot( 2 to < 5 years): Time interval: 2 to < 5 years

  • Interaction: Hyperlink: Table (5 or more years:): Time interval: 5 or more years Variable: Time3 Hazard

    ratio Standard

    error z P < |z| 95% confidence

    interval chdstart 1.360623 0.838447 0.500 0.617 0.406638 4.552683 log likelihood = 126.12672 Interaction: Hyperlink: Plot( 5 or more years:): Time interval: 5 or more years

  • Interaction: Button: clouds picture (pop up box appears): The hazard ratio in every interval shows an increased hazard of survival for men with 'CHD at entry'. The confidence intervals overlap. You can probably assume proportional hazards. Notice in the last interval, > 5 years, the effect is not statistically significant: HR = 1.36 (95% CI: 0.41 to 4.55); P = 0.6. Remember, there are few men in the group with 'CHD at entry' at this time of follow-up. 6.3: Formal test of proportionality assumption You can test whether the hazards are proportional by including an interaction between the time interval and 'CHD at entry'. The model with this is shown below. Interaction: Button: Interpret (pop up box appears): You can obtain the hazard ratio in each time interval that you have just seen by multiplying the baseline interval by the corresponding interaction terms. The hazard ratio for the effect of 'CHD at entry' during 0 to < 2 years is 2.90. The hazard ratio for the effect of 'CHD at entry' during 2 to < 5 years is 2.90 x 0.74 = 2.15. The hazard ratio for the effect of 'CHD at entry' for 5 years or more is 2.90 x 0.47 = 1.36. You can compare this model to the model without interaction to obtain a test for proportional hazards in the 3 intervals.

  • The likelihood ratio statistic (LRS) = 0.91, P = 0.6. Therefore, there is no evidence for non-proportional hazards for 'CHD at entry'. Cox model with time interval interaction for 'CHD at entry' Hazard

    ratio Standard

    error z P < |z| 95% confidence

    interval chdstart 2.907241 1.547554 2.005 0.045 1.024183 8.252478 time2.chd 0.742399 0.506926 0.436 0.663 0.194723 2.830457 time3.chd 0.468012 0.381102 0.932 0.351 0.094869 2.308821 log likelihood = 396.34851 6.4: Formal test of proportionality assumption Now let's test the proportionality assumption for the effect of smoking. Click the blue words below to see the estimates from a Cox regression for each follow-up interval as a table, or as a cumulative hazard plot. 0 to < 2 years: Table Plot 2 to < 5 years: Table Plot 5 or more years: Table Plot Examine the estimates and the corresponding plots. Do you think you can assume proportional hazards for a model that includes exposure to smoking? Interaction: Hyperlink: Table (0 to < 2 years): Time interval: 0 to < 2 years Variable: Time1 Hazard

    ratio Standard

    error z P < |z| 95% confidence

    interval smoking 0.938849 0.383288 0.155 0.877 0.421784 2.089784 log likelihood = 154.33885 Interaction: Hyperlink: Plot (0 to < 2 years): Time interval: 0 to < 2 years

  • Interaction: Hyperlink: Table (2 to < 5 years:): Time interval: 2 to < 5 years Variable: Time2 Hazard

    ratio Standard

    error z P < |z| 95% confidence

    interval smoking 1.840149 0.640995 1.751 0.080 0.929708 3.642163 log likelihood = 183.49946 Interaction: Hyperlink: Plot (2 to < 5 years:): Time interval: 2 to < 5 years

  • Interaction: Hyperlink: Table (5 or more years:): Time interval: 5 or more years Variable: Time3

    Hazard ratio

    Standard

    error

    z P < |z| 95% confidence interval

    smoking 2.216505

    0.840160 2.100 0.036 1.054443 4.659229

    log likelihood = 140.88691 Interaction: Hyperlink: Plot (5 or more years:): Time interval: 5 or more years

  • Interaction: Button: clouds picture (pop up box appears): The hazard ratio in the earliest interval shows a non-significant protective hazard for survival with exposure to smoking. Both intervals above 2 years show an increased hazard of approximately the same magnitude. However, all the confidence intervals overlap. So maybe the Hazard ratios in each interval are similar and proportional hazards can be assumed. 6.5: Formal test of proportionality assumption You can test whether the hazards are proportional by including an interaction between the time interval and smoking. This model is shown below. Interaction: Button: Interpret: Again, you can obtain the hazard ratio in each time interval by multiplying the baseline interval by the corresponding interaction terms. The hazard ratio for the effect of smoking up to 2 years is 0.938. The hazard ratio for the effect of smoking during 2 to < 5 years is 0.938 x 1.96 = 1.83. The hazard ratio for the effect of smoking for 5 years or more is 0.938 x 2.36 = 2.21. Comparing this model to the model without interaction, the likelihood ratio statistic gave P = 0.26. Therefore, there is no evidence for non-proportional hazards for smoking. Cox model with time interval interaction for smoking

  • Hazard

    ratio Standard

    error z P < |z| 95% confidence

    interval smoking 0.938849 0.383288 0.155 0.877 0.421784 2.089784 smok.time2

    1.960006 1.051869 1.254 0.210 0.684615 5.611364

    smok.time3

    2.360875 1.315216 1.542 1.542 0.792280 7.035057

    log likelihood = 478.72523 Section 7: Non-proportional hazards There are a number of reasons why the effect of an exposure may change over time, and when this happens the proportional hazards assumption of the Cox regression model is violated. We can deal with this by splitting the follow-up period into two or more time bands, and fitting a model in which the effect of the exposure is allowed to vary between time bands. You will see how to do this in Practical 6. If you have a variable that is not of central interest but has been measured because it is a confounder, and if its effect varies over time, then you can stratify your Cox regression model on this variable, using the strata() option in STATA Section 8: Summary This is the end of AS07. When you are happy with the material covered here please move on to session AS08 . The main points of this session will appear below as you click on the relevant title. Use of Cox regression Cox regression is used to model rapidly changing rates. In survival analysis, a rate is more commonly referred to as a hazard and the effect of exposure is a hazard ratio. The hazard is assumed constant within a timeclick, but is allowed to change over time. Proportional hazards assumption The key assumption for Cox regression is that the effect of an exposure is constant over time. In other words, the variation in an exposed group is the same as the variation in the baseline group, resulting in the effect of exposure being constant. This is called the proportional hazards assumption. Nelson-Aalen plots

  • The proportional hazards assumption can be assessed graphically using log cumulative hazard plots, otherwise known as Nelson-Aalen plots. The curves in these plots will be parallel if the hazards are proportional. Interaction with time To formally assess the proportional hazards assumption you need to create a time interval variable. You can then include the interaction for the exposure of interest and the time interval in the Cox regression model. If this interaction is significant the assumption is not valid. In this case, you must retain the interaction terms in your model, and report the effect of the exposure separately for each time band. You assess whether the interaction is significant using a likelihood ratio test.

    2.1: Planning your study3.1: Cox regression3.2: Cox regression3.3: Cox regression3.4: Cox regression3.5: Cox regression4.1: The proportionality assumption4.2: The proportionality assumption5.1: Graphical assessment of proportionality5.2: Graphical assessment of proportionality5.3: Graphical assessment of proportionality5.4: Graphical assessment of proportionality5.5: Graphical assessment of proportionality5.6: Graphical assessment of proportionality5.7: Graphical assessment of proportionality5.8: Graphical assessment of proportionality6.1: Formal test of proportionality assumption6.2: Formal test of proportionality assumption6.3: Formal test of proportionality assumption6.4: Formal test of proportionality assumption6.5: Formal test of proportionality assumption