01 Introduction Statr2-Lec3
01 Introduction Statr2-Lec3
Regression
John McGready, PhD
Johns Hopkins University
Simple Cox Regression: An Overview
The material in this video is subject to the copyright of the owners of the material and is being provided for educational purposes under
rules of fair use for registered students in this course only. No additional copies of the copyrighted work may be made or distributed.
Learning Objectives
► In this set of lectures, we will develop a framework for simple Cox proportional hazards
regression, a method for relating a time-to-event outcome to a single predictor that can
be binary, categorical, or continuous
► The “Cox” part of the method’s name is for its inventor Sir David Cox (he was knighted in
1985!) who is still currently involved in the application and creation of statistical
methodologies
► The “proportional hazards” part of the name refers to a major assumption of this
regression model, which will be explained throughout this set of lectures
► For Cox PH regression, the equation differs slightly from the previous regression methods
covered, both in the right- and left-hand sides
► Cox regression models the natural 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) of a binary outcome (𝑦𝑦) as a function of
a predictor 𝑥𝑥1, and the follow-up time 𝑡𝑡
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 [𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟] 𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑦𝑦 = 1 = 𝑙𝑙𝑙𝑙 𝜆𝜆(𝑥𝑥1 , 𝑡𝑡) = 𝑙𝑙𝑙𝑙(𝜆𝜆0 𝑡𝑡 ) + 𝛽𝛽1 𝑥𝑥1
4
Cox Regression in General—2
► For example
► If 𝑦𝑦 = 1 if a cancer patient in remission has a relapse, 𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑦𝑦 = 1 =
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟
5
Cox Regression in General—3
► What is “hazard”?
► Technically speaking, hazard is the instantaneous risk of having the event at a given
time in the follow-up period: the risk of having the event among those who are at risk
of having the event at this time in the follow-up period
► For interpretation purposes, we can think of hazard as time-specific risk of having the
event of interest, i.e., the time-specific incidence
6
Cox Regression in General—4
► As with everything else we have done thus far, we will only be able to estimate the
regression equation from a sample of data: to indicate the estimates, we can write as:
► The reason for this choice of scaling [𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎)] is the same as with logistic regression:
in order to do an unconstrained estimation of the slope, 𝛽𝛽̂1 , the left hand side (LHS) needs
to have unrestricted values, and −∞ ≤ 𝑙𝑙𝑙𝑙 𝜆𝜆(𝑥𝑥1 , 𝑡𝑡) ≤ ∞
7
Cox Regression in General—5
► For a given value of 𝑥𝑥1 and a specific follow-up time 𝑡𝑡, the resulting Cox regression
equation can be used to estimate the 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) of a binary outcome 𝑦𝑦, for a group of
subjects with the same value of 𝑥𝑥1
► Any estimated 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) value can be then converted into an estimated survival
̂
probability (𝑆𝑆(𝑡𝑡)): we will discuss how this is done this in the last section of this lecture
set
8
Cox Regression in General: The Slope—1
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 risk 𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑦𝑦 = 1 = 𝑙𝑙𝑙𝑙 𝜆𝜆(𝑥𝑥1 , 𝑡𝑡) = 𝑙𝑙𝑙𝑙 𝜆𝜆�0 𝑡𝑡 + 𝛽𝛽̂1 𝑥𝑥1
𝑙𝑙𝑙𝑙(𝜆𝜆�0 𝑡𝑡 ) is the estimated 𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑦𝑦 = 1 𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 = 𝑡𝑡 when 𝑥𝑥1 = 0
► 𝛽𝛽̂1 is the change in the 𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑦𝑦 = 1 for a one-unit change in 𝑥𝑥1 at any time
in the follow-up period; in other words, the difference in the 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑦𝑦 =
9
Cox Regression in General: The Slope—2
► Difference in 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) for a one-unit difference in 𝑥𝑥1 at any specific time 𝑡𝑡?
10
Cox Regression in General: The Slope—3
► Slopes are interpretable as difference in 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) per unit difference in 𝑥𝑥1 at a given
time (𝑡𝑡) in the follow-up period
► The difference in 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) between two groups who differ by one unit of 𝑥𝑥1 is the
same regardless of the time of comparison
�
► The exponentiated slope, 𝑒𝑒 𝛽𝛽1 , is the estimated hazard ratio of the outcome for two
groups who differ by one unit in 𝑥𝑥1 at any time point 𝑡𝑡 in the follow-up period
11
Cox Regression in General: The Slope—4
𝑥𝑥1 = 𝑎𝑎 + 1: 𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑦𝑦 = 1: 𝑥𝑥1 = 𝑎𝑎 + 1, 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 = 275 = 𝑙𝑙𝑙𝑙(𝜆𝜆̂ 0 𝑡𝑡 = 275 ) + 𝛽𝛽̂1 (𝑎𝑎 + 1)
𝑥𝑥1 = 𝑎𝑎: 𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑦𝑦 = 1: 𝑥𝑥1 = 𝑎𝑎, 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 = 275 = 𝑙𝑙𝑙𝑙(𝜆𝜆̂ 0 𝑡𝑡 = 275 ) + 𝛽𝛽̂1 (𝑎𝑎)
�
► Again, the exponentiated slope, 𝑒𝑒 𝛽𝛽1 , is the estimate hazard ratio of the outcome for two
groups who differ by one unit in 𝑥𝑥1 at any time point 𝑡𝑡 in the follow-up period
12
Cox Regression in General: The Intercept and Proportional Hazards—1
13
Cox Regression in General: The Intercept and Proportional Hazards—2
► At any given time 𝑡𝑡, the difference between the 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) between any two groups
with different 𝑥𝑥1 values is constant, and a multiple of the slope 𝛽𝛽̂1
► On the exponentiated hazard scale, this constant difference on the 𝑙𝑙𝑛𝑛 scale translates to a
constant hazard ratio across the entire follow-up time period
► This is the property of proportional hazards
14
Summary
► Cox proportional hazards regression allows for the estimation of a 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟) and,
hence, a hazard ratio comparing the hazard (risk) of the outcome over the follow-up
period between two groups who differ by one unit in the predictor 𝑥𝑥1
► The model “assumes” that the relative hazard (hazard ratio) of the outcome for any two
groups being compared is constant across the entire follow-up period
15
Simple Cox Regression with a Binary (or
Categorical) Predictor
The material in this video is subject to the copyright of the owners of the material and is being provided for educational purposes under
rules of fair use for registered students in this course only. No additional copies of the copyrighted work may be made or distributed.
Learning Objectives
► Understand how Cox regression relates a function of the hazard (risk) of a binary outcome
occurring over time to a predictor via a linear equation
► Interpret the resulting intercept and slope(s) from a Cox regression model in which the
predictor of interest is binary or categorical
2
Primary Biliary Cirrhosis (PBC) Trial
Source: Dickson, E., et al. (1985). Trial of penicillamine in advanced primary biliary cirrhosis. N Engl J Med, 312(16), 1011–1015. 3
PBC Trial—1
► 312 patients with primary biliary cirrhosis (PBC) were enrolled in the study done by the
Mayo clinic: patients were randomized to DPCA or placebo
4
PBC Trial—2
► KM curves for the DPCA and placebo groups in the same graphic
5
PBC Trial—3
► There is very little visual evidence to indicate that the drug and placebo groups have
different survival trajectories
► A quantitative measure of the association with confidence limits will add depth to this
analysis
► Cox regression can be used estimated a hazard ratio (incidence rate ratio) and its
confidence limits
6
PBC Trial: Cox Regression Model
where 𝑥𝑥1 = 1 if patient was on DPCA, and 𝑥𝑥1 = 0 if patient was in placebo group
7
PBC Trial: Regression Model
� �
so 𝑒𝑒 𝛽𝛽1 = 𝐻𝐻𝐻𝐻
8
PBC Trial: Cox Regression Model Result
9
Infant Mortality and Prenatal Vitamins—1
Source: Katz, J., West, K., et al. (2000). Maternal low-dose vitamin A or β-carotene supplementation has no effect on fetal loss and early infant mortality: A
randomized cluster trial in Nepal. Am J Clin Nutr, 71(6), 1570–1576. 10
Infant Mortality and Prenatal Vitamins—2
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑡𝑡 = 𝑙𝑙𝑙𝑙 𝜆𝜆(𝑥𝑥1 , 𝑡𝑡) = 𝑙𝑙𝑙𝑙 𝜆𝜆�0 𝑡𝑡 + 𝛽𝛽̂1 𝑥𝑥1 + 𝛽𝛽̂2 𝑥𝑥2
where 𝑥𝑥1 = 1 and 𝑥𝑥2 = 0 if mother given beta carotene
and 𝑥𝑥1 = 0 and 𝑥𝑥2 = 1 if mother given vitamin A
(reference group with 𝑥𝑥1 = 0 and 𝑥𝑥2 = 0 is the placebo group)
11
Infant Mortality and Prenatal Vitamins—3
�
So 𝛽𝛽̂1 = 0.02, 𝑎𝑎𝑎𝑎𝑎𝑎 𝑒𝑒𝛽𝛽1 = 𝑒𝑒 0.02 = 𝐻𝐻𝐻𝐻
� 𝐵𝐵𝐵𝐵 𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 ≈ 1.02
�
And 𝛽𝛽̂2 = 0.06 𝑎𝑎𝑎𝑎𝑎𝑎 𝑒𝑒𝛽𝛽2 = 𝑒𝑒 0.06 = 𝐻𝐻𝐻𝐻
� 𝑉𝑉𝑉𝑉𝑉𝑉 𝐴𝐴 𝑡𝑡𝑡𝑡 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 = 1.06
12
Breastfeeding Practices—1
Source: Lin, W., et al. (2011). Effectiveness of an early intervention on infant feeding practices and “tummy time”: A randomized controlled trial. Arch Pediatr
Adolesc Med, 165(8), 701–707. 13
Breastfeeding Practices—2
14
Breastfeeding Practices—3
► “Compared with the control group, the hazard ratio for stopping breastfeeding in the
intervention group was 0.82”
where 𝑥𝑥1 = 1 for the intervention group, and 0 for the placebo group
15
Summary
► The slopes from Cox regression models with a binary or categorical predictor compare the
𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) of the time-to-event outcome between two groups at the same time in the
follow-up period
► Slopes can be exponentiated to get the estimated hazard ratio for the groups being
compared
► The intercept, 𝑙𝑙𝑙𝑙 𝜆𝜆�0 𝑡𝑡 , tracks the natural log of the baseline hazard in the reference
group (all 𝑥𝑥s = 0)
16
Simple Cox Regression with a Continuous
Predictor
The material in this video is subject to the copyright of the owners of the material and is being provided for educational purposes under
rules of fair use for registered students in this course only. No additional copies of the copyrighted work may be made or distributed.
Learning Objectives
► Interpret the slopes from simple Cox regression models as 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟) and the
exponentiated slopes as hazard ratios
► Empirically assess whether the relationship between the 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) of the outcome and
a continuous predictor is linear
2
Primary Biliary Cirrhosis (PBC) Trial
Source: Dickson, E., et al. (1985). Trial of penicillamine in advanced primary biliary cirrhosis. N Engl J Med, 312(16), 1011–1015. 3
PBC Trial—1
► A randomized clinical trial on 312 patients with primary biliary cirrhosis (PBC) studied at
the Mayo clinic
► Patients were followed from enrollment until death or censoring
► The follow-up period was up to 12 years
► Question: What is the association between mortality and bilirubin level at enrollment
(mg/dL)?
► Bilirubin was measured continuously in mg/dL
► Can we quantify this association while keeping bilirubin as continuous?
4
PBC Trial—2
5
PBC Trial: Death and Baseline Bilirubin—1
► Cox regression for these data: for the moment, assume relationship between
𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) and bilirubin levels is linear
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑡𝑡 = 𝑙𝑙𝑙𝑙(𝜆𝜆 𝑡𝑡, 𝑥𝑥1 ) = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 0 𝑡𝑡 + 𝛽𝛽̂1 𝑥𝑥1
► So the slope 𝛽𝛽̂1 is the difference in the 𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑡𝑡 for two
groups who differ by one unit in bilirubin (1 mg/dL):
𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑏𝑏 + 1
which by the properties of logarithms 𝛽𝛽̂1 = 𝑙𝑙𝑙𝑙 �
= 𝑙𝑙𝑙𝑙 𝐻𝐻𝐻𝐻
𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑏𝑏
6
PBC Trial: Cox Regression Results
7
PBC Trial—3
► What is the estimated hazard ratio for persons with bilirubin levels of 3.5 mg/dL versus
0.8 mg/dL (at any specific time point in the follow-up period)?
when 𝑥𝑥1 = 3.5: 𝑙𝑙𝑙𝑙 𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 𝑜𝑜 𝑡𝑡 + 0.15 3.5
when 𝑥𝑥1 = 0.8: 𝑙𝑙𝑙𝑙 𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 0 𝑡𝑡
+ 0.15 0.8
� 3.5 𝑣𝑣𝑣𝑣 0.8
So, 𝑙𝑙𝑙𝑙 𝐻𝐻𝐻𝐻 � 3.5 𝑣𝑣𝑣𝑣 0.5 = 𝑒𝑒 0.405 ≈ 1.5
= 0.15 3.5 − 0.8 = 0.15 2.7 = 0.405: 𝐻𝐻𝐻𝐻
8
PBC Trial: Assessing Linearity Assumption—1
► Can use an empirical approach: categorize the continuous predictor into groups and
see if the difference in 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) between consecutive ordinal groups is similar
9
PBC Trial: Assessing Linearity Assumption—2
► Bilirubin was categorized into four quartiles, and the three indicator 𝑥𝑥’s are as follows:
► Where 𝑥𝑥1 = 1 for quartile 2 and 0 otherwise
► Where 𝑥𝑥2 = 1 for quartile 3 and 0 otherwise
► Where 𝑥𝑥3 = 1 for quartile 4 and 0 otherwise
► (Reference group with 𝑥𝑥1 = 𝑥𝑥2 = 𝑥𝑥3 = 0 is quartile 1)
10
PBC Trial: Death and Baseline Bilirubin—2
11
Infant Mortality and Gestational Age—1
Source: Katz, J., West, K., et al. (2000). Maternal low-dose vitamin A or β-carotene supplementation has no effect on fetal loss and early infant mortality: A
randomized cluster trial in Nepal. Am J Clin Nutr, 71(6), 1570–1576. 12
Infant Mortality and Gestational Age—2
► Cox regression for these data: For the moment, assume the relationship between
𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚) and gestational is linear in the six-month follow-up period
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑡𝑡 = 𝑙𝑙𝑙𝑙 (𝜆𝜆 𝑡𝑡, 𝑥𝑥1 ) = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 0 𝑡𝑡 + 𝛽𝛽̂1 𝑥𝑥1 ,
where 𝑥𝑥1 = 𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔𝑔 𝑎𝑎𝑎𝑎𝑎𝑎 (𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤)
► So the slope 𝛽𝛽̂1 is the difference in the 𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑡𝑡 for two groups of
infants who differ by one unit of gestational age (one week):
𝛽𝛽̂1 = 𝑙𝑙𝑙𝑙 𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑎𝑎 + 1
− 𝑙𝑙𝑙𝑙(𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑎𝑎 ),
𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑎𝑎 + 1
̂
which by the properties of logarithms 𝛽𝛽1 = 𝑙𝑙𝑙𝑙 �
= 𝑙𝑙𝑙𝑙 𝐻𝐻𝐻𝐻
𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑎𝑎
13
Infant Mortality and Gestational Age: Cox Regression Results
15
Infant Mortality and Gestational Age: Assessing Linearity
Assumption—2
► For these data, gestational age was categorized into five groupings: <36 weeks, [36, 38]
weeks, [38, 39] weeks, [39, 41] weeks, and 41+ weeks
► <36 weeks is the designated reference group, and four 𝑥𝑥’s
► 𝑥𝑥1 – 𝑥𝑥4 are the indicators for the second through fifth groups, respectively
16
Infant Mortality and Gestational Age—3
17
Summary
► Slopes from simple Cox regression models with a continuous predictor have a
𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟) interpretation, and can be exponentiated to estimate hazard ratios
► The assumption of linearity between the 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎) of the binary outcome and a
continuous predictor 𝑥𝑥1 can be assessed empirically by comparing the results from Cox
regressions with 𝑥𝑥1 modeled as continuous, compared to where the continuous values are
categorized into several ordinal groups
18
Simple Cox Regression: Accounting for
Uncertainty in the Estimates
The material in this video is subject to the copyright of the owners of the material and is being provided for educational purposes under
rules of fair use for registered students in this course only. No additional copies of the copyrighted work may be made or distributed.
Learning Objectives
► Create 95% CIs for the slopes from simple Cox regression models and convert these to
95% CIs for hazard ratios
► Estimate p-values for testing the null 𝐻𝐻0: 𝛽𝛽1 = 0 (and hence HR= 1)
2
PBC Trial Results—1
► So in the previous sections, we showed the results from several simple Cox regression
models
► For example, in analysis of death by treatment group (DPCA vs placebo), the resulting Cox
regression equation for this analysis is 𝑙𝑙𝑙𝑙 𝜆𝜆(𝑥𝑥1 , 𝑡𝑡) = 𝑙𝑙𝑙𝑙 𝜆𝜆�0 𝑡𝑡 + 0.057𝑥𝑥1 , where 𝑥𝑥1 =
1 for persons randomized to the DPCA group, and 0 for persons randomized to the
placebo group
► This was estimated from the individual-level data, using a a computer package
► What is the algorithm to estimate this equation?
► There must be some algorithm that will always yield the same results for the same data
set, regardless of the computer package used to fit the regression model
3
Estimation of the Cox Regression Equation—1
► For Cox regression, this approach is called “partial maximum likelihood”: The estimates for
the slope(s) (𝛽𝛽̂1 ) is/are the values that make the observed data “most” likely among all
possible choices for 𝛽𝛽̂1
► The slope is estimated after the baseline hazard function 𝜆𝜆̂ 0 (𝑡𝑡)is estimated via another
process (which also generates estimates of uncertainty for this estimated function)
4
Estimation of the Cox Regression Equation—2
► The values chosen for 𝛽𝛽̂1 are just estimates based on a single sample
► For a different random sample of 309 subjects from the same population of patients
with PBC, the values of 𝛽𝛽̂1 would vary
► As such, all regression coefficients have an associated standard error that can be used to
make statements about the true relationship between 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑦𝑦 = 1) and 𝑥𝑥1 (for
example, the true slope 𝛽𝛽1 ), based on a single sample
► The method of partial maximum likelihood yields standard errors for the slope estimate
𝛽𝛽̂1
5
95% CIs and p-Values—1
► The standard errors allow for the computation of 95% CIs and p-values for the slope
► Hence, it is “business as usual” for getting 95% CIs and doing hypothesis tests with one
caveat: The CIs are done on the 𝑙𝑙𝑙𝑙 scale, and these results can be exponentiated
6
95% CIs and p-Values—2
7
PBC Trial Results—2
► Again, in analysis of death by treatment group (DPCA vs placebo), the resulting Cox
regression equation for this analysis is 𝑙𝑙𝑙𝑙 𝜆𝜆(𝑥𝑥1 , 𝑡𝑡) = 𝑙𝑙𝑙𝑙 𝜆𝜆�0 𝑡𝑡 + 0.057𝑥𝑥1 where 𝑥𝑥1 = 1
for persons randomized to the DPCA group, and 0 for persons randomized to the placebo
group
8
PBC Trial Results—3
► 95% CI for population slope 𝛽𝛽1 ► p-Value for population slope 𝛽𝛽1
𝐻𝐻0 : 𝛽𝛽1 = 0 vs 𝐻𝐻𝐴𝐴 : 𝛽𝛽1 ≠ 0
𝛽𝛽̂1 ± 2𝑆𝑆𝑆𝑆
� 𝛽𝛽̂1 → 0.057 ± 2 0.18 →
𝐻𝐻0 : 𝑒𝑒 𝛽𝛽1 = 𝐻𝐻𝐻𝐻 = 1 vs 𝐻𝐻0 : 𝑒𝑒 𝛽𝛽1 = 𝐻𝐻𝐻𝐻 ≠ 1
≈ (−0.30, 0.42)
► Assume null is true and calculate distance
� 𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷 𝑣𝑣𝑣𝑣 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 = 𝑒𝑒 0.057 ≈ 1.06, and of slope estimate 𝛽𝛽̂1 in units of standard
► 𝐻𝐻𝐻𝐻
error
95% CI for population hazard ratio (HR) is
𝛽𝛽̂1 0.057
given by 𝑒𝑒 −0.30 , 𝑒𝑒 0.42 → (0.74, 1.5) 𝑧𝑧 = = ≈ 0.32
�
𝑆𝑆𝑆𝑆(𝛽𝛽)̂ 0.18
► Translate to a p-value
► In this example, the p-value is
approximately 0.75
9
PBC Trial Results—4
► Summary of findings:
► Between 1974 and 1983, a total of 312 patients (36 male, 276 female) with PBC were
enrolled in a randomized clinical trial conducted at the Mayo Clinic (Rochester, MN)
► These patients were randomized to receive D-penicillamine (DPCA, 𝑛𝑛 = 158) or a placebo
(𝑛𝑛 = 154)
► Patients were followed for up to 12 years until death or censoring (loss to follow-up or study
completion without death)
► A total of 125 patients died during the follow-up period: 65 in the DPCA arm and 60 in the
placebo arm
► The relative hazard of death in the follow-up period for the DPCA arm compared to the
placebo arm is 1.06 (95% CI: 0.74, 1.50)
► The results show no discernible benefit of DPCA in extending the life of subjects with PBC
10
PBC Trial: Mortality and Baseline Bilirubin—1
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑡𝑡 = 𝑙𝑙𝑙𝑙(𝜆𝜆 𝑡𝑡, 𝑥𝑥1 ) = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 0 𝑡𝑡 + 0.15𝑥𝑥1
11
PBC Trial: Mortality and Baseline Bilirubin—2
► 95% CI for population slope 𝛽𝛽1 ► p-Value for population slope 𝛽𝛽1
𝐻𝐻0 : 𝛽𝛽1 = 0 vs 𝐻𝐻𝐴𝐴 : 𝛽𝛽1 ≠ 0
𝛽𝛽̂1 ± 2𝑆𝑆𝑆𝑆
� 𝛽𝛽̂1 → 0.15 ± 2 0.013 → 𝐻𝐻0 : 𝑒𝑒 𝛽𝛽1 = 𝐻𝐻𝐻𝐻 = 1 vs 𝐻𝐻0 : 𝑒𝑒 𝛽𝛽1 = 𝐻𝐻𝐻𝐻 ≠ 1
≈ (0.124, 0.176) ► Assume null is true and calculate distance
of slope estimate 𝛽𝛽̂1 in units of standard
� = 𝑒𝑒 0.15. ≈ 1.16 and 95% CI for the error
► 𝐻𝐻𝐻𝐻
𝛽𝛽̂1 0.15
population hazard ratio (HR) is given by 𝑧𝑧 = = ≈ 11.5
𝑒𝑒 0.124 , 𝑒𝑒 0.176 → (1.13, 1.19) � 𝛽𝛽)
𝑆𝑆𝑆𝑆( ̂ 0.013
► Translate to a p-value
► In this example, the p-value is very
small, <0.001
12
PBC Trial: Mortality and Baseline Bilirubin—3
► Summary of findings:
► Between 1974 and 1983, a total of 312 patients (36 male, 276 female) with PBC were
enrolled in a randomized clinical trial conducted at the Mayo Clinic (Rochester, MN)
► These patients were randomized to receive D-penicillamine (DPCA, 𝑛𝑛 = 158) or a placebo
(𝑛𝑛 = 154)
► Patients were followed for up to 12 years until death or censoring (loss to follow-up or study
completion without death)
► Baseline bilirubin levels were assessed on each enrollee at the time of randomization
(𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 = 3.3 𝑚𝑚𝑚𝑚/𝑑𝑑𝑑𝑑, 𝑠𝑠𝑠𝑠 = 4.5, 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 0.3– 28)
► Higher bilirubin levels at baseline were associated with a higher risk of death in the study
follow-up period
► Each additional mg/dL of baseline bilirubin was associated with 16% increase in the risk of
death (95% CI 13% to 19%)
13
Summary
► The construction of confidence intervals for Cox regression slopes is “business as usual”:
Take the estimate and add/subtract 2 estimated standard errors for “large samples”
► In smaller samples, the 95% CI and p-values are based on exact computations, but this
detail will be handled by a computer
► The interpretations of the CIs and p-values are the same regardless of sample size
► Confidence intervals for slopes are confidence intervals for 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟)𝑠𝑠
► These endpoints can be exponentiated to get a confidence interval for a hazard ratio
14
Estimating Survival Curves from Cox
Regression Results
The material in this video is subject to the copyright of the owners of the material and is being provided for educational purposes under
rules of fair use for registered students in this course only. No additional copies of the copyrighted work may be made or distributed.
Learning Objectives
► Know that the results from any Cox regression model can be translated into estimated
survival curves for groups with different 𝑥𝑥 values
2
Survival Curve 𝑆𝑆(𝑡𝑡) Estimates Based on Cox Regression Results—1
̂ 𝑥𝑥1 )?
► How to get estimate cumulative survival for a given value of (𝑥𝑥1 ), i.e., 𝑆𝑆(𝑡𝑡,
► Short answer to the above query: It can be done, but it is mathematically involved
► Further, when 𝑥𝑥1 is continuous, it is not generally possible to display estimated survival
curves for all possible values of 𝑥𝑥1 in a sample, even if the curves can be estimated
► So, for display purposes, several specific values of 𝑥𝑥1 can be specified and the estimated
survival curves displayed
3
Survival Curve 𝑆𝑆(𝑡𝑡) Estimates Based on Cox Regression Results—2
̂ 𝑥𝑥1 ) ?
► How to get estimate cumulative survival for a given value of (𝑥𝑥1 ), i.e., 𝑆𝑆(𝑡𝑡,
► Longer answer
► Step 1: For any time 𝑡𝑡 in the follow-up period, and specific value of 𝑥𝑥1 , the Cox
regression can be used to the estimate the 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑦𝑦 = 1) via:
4
Survival Curve 𝑆𝑆(𝑡𝑡) Estimates Based on Cox Regression Results—3
̂ 𝑥𝑥1 )?
► How to get estimate cumulative survival for a given value of (𝑥𝑥1 ), i.e., 𝑆𝑆(𝑡𝑡,
► Step 4: Translate the cumulative hazard estimate into an estimate point on the survival
�
curve: 𝑆𝑆̂ 𝑡𝑡, 𝑥𝑥1 = 𝑒𝑒 −𝐻𝐻(𝑡𝑡)
5
Infant Mortality and Gestational Age—1
► For these data, gestational age was categorized into five groupings: <36 weeks, [36, 38]
weeks, [38, 39] weeks, [39, 41] weeks, and 41+ weeks
► <36 weeks is the designated reference group, and four 𝑥𝑥’s
► 𝑥𝑥1 – 𝑥𝑥4 are the indicators for the second through fifth groups, respectively
6
Infant Mortality and Gestational Age—2
► KM approach versus Cox for two of the five gestational age groups
7
Infant Mortality and Gestational Age—3
► Cox-generated curves with 95% confidence bounds (95% CIs for each point on curves)
8
Summary
► The results from a Cox regression equation yield an estimated hazard ratio (or ratios with
a multicategorical predictor) and 95% CI, which allows for the quantification of the
relationship between a time-to-event outcome and a predictor on the relative scale
► With the aid of a computer, the resulting Cox regression can be used to construct
̂
predicted estimated cumulative survival curves (𝑆𝑆(𝑡𝑡)) as alternatives to those estimated
by the Kaplan-Meier method
► In many situations, the resulting methods will produce similar estimates, but the Cox-
based curves are constructed under a proportional hazards assumption
9
Additional Examples
The material in this video is subject to the copyright of the owners of the material and is being provided for educational purposes under
rules of fair use for registered students in this course only. No additional copies of the copyrighted work may be made or distributed.
ART and Partner-to-Partner HIV Transmission
Source: Cohen, M., et al. (2011). Prevention of HIV-1 infection with early antiretroviral therapy. N Engl J Med, 365(6), 493–505. 2
Example: ART and Partner-to-Partner HIV Transmission—1
3
Example: ART and Partner-to-Partner HIV Transmission—2
► The underlying Cox model for the outcome of linked transmissions (total of 28, all but one
in the traditional therapy group) is:
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 = 𝑙𝑙𝑙𝑙(𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 0 𝑡𝑡 + −3.21𝑥𝑥1
► Where 𝑥𝑥1 = 1 for HIV-positive partners on accelerated treatment and 0 for those on
traditional therapy
� 𝛽𝛽̂1 ) ≈ 0.95
► Also, 𝑆𝑆𝑆𝑆(
► So, the estimated hazard ratio for transmission from partners in accelerated treatment,
�
compared to those on traditional therapy, is 𝑒𝑒 𝛽𝛽1 = 𝑒𝑒 −3.21 ≈ 0.04
► The 95% for the true population hazard ratio, HR, is given by (𝑒𝑒 −3.21−2(0.95) ,
𝑒𝑒 −3.21+2(0.95) ) or (0.006, 0.27), which, when rounded, is (0.01, 0.27) as reported by the
authors
4
Example: ART and Partner-to-Partner HIV Transmission—3
► The underlying Cox model for the outcome of linked transmissions (total of 28, all but one
in the traditional therapy group) is:
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 = 𝑙𝑙𝑙𝑙(𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 𝑜𝑜 𝑡𝑡 + −3.21𝑥𝑥1 and
� 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑒𝑒 𝛽𝛽�1 = 𝑒𝑒 −3.21 ≈ 0.04
𝐻𝐻𝐻𝐻
► The intercept, 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 0 𝑡𝑡 , is the 𝑙𝑙𝑙𝑙(ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡) as a function of
time 𝑡𝑡 over the follow-up period for the traditional therapy group
► At any time 𝑡𝑡:
𝑙𝑙𝑙𝑙(𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 1 = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 0 𝑡𝑡 + −3.21, and
�0 𝑡𝑡 + −3.21
𝑙𝑙𝑙𝑙 𝜆𝜆 �0 𝑡𝑡
𝑙𝑙𝑙𝑙 𝜆𝜆
𝜆𝜆 𝑡𝑡, 𝑥𝑥1 = 1 = 𝑒𝑒 = 𝑒𝑒 𝑒𝑒 −3.21 = 0.04(𝜆𝜆̂ 0 𝑡𝑡 )
5
Example: ART and Partner-to-Partner HIV Transmission—4
6
PBC Trial: Mortality and Baseline Bilirubin—1
𝑙𝑙𝑙𝑙 ℎ𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑜𝑜𝑜𝑜 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑎𝑎𝑎𝑎 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑡𝑡 = 𝑙𝑙𝑙𝑙(𝜆𝜆 𝑡𝑡, 𝑥𝑥1 ) = 𝑙𝑙𝑙𝑙 𝜆𝜆̂ 0 𝑡𝑡 + 0.15𝑥𝑥1
7
PBC Trial: Mortality and Baseline Bilirubin—2
► 95% CI for population slope 𝛽𝛽1 ► What is the estimated hazard ratio of
death and 95% CI for persons with
𝛽𝛽̂1 ± 2𝑆𝑆𝑆𝑆
� 𝛽𝛽̂1 → 0.15 ± 2 0.013 → bilirubin of 3.5 mg/dL, compared to
≈ (0.124, 0.176) persons with bilirubin of 0.8 mg/dL?
8
PBC Trial: Mortality and Baseline Bilirubin—3