viktor oskarsson andrea discacciati nicola orsini · 2015. 9. 21. · viktor oskarsson andrea...
TRANSCRIPT
![Page 1: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/1.jpg)
2015-09-04 1
The use of restricted cubic splines to evaluate
nonproportional hazards in Cox regression Viktor Oskarsson Andrea Discacciati Nicola Orsini
Viktor Oskarsson
Unit of Nutritional Epidemiology and Unit of Biostatistics
Institute of Environmental Medicine
Karolinska Institutet
2015 Nordic and Baltic Stata Users Group meeting
![Page 2: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/2.jpg)
Cox regression is the most common regression method for time-to-event data
An exposure-outcome association is normally quantified into a single hazard
ratio (HR)
A single HR is only meaningful under proportional hazards (PHs)
2015-09-04 Viktor Oskarsson 2
Introduction I Cox regression
![Page 3: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/3.jpg)
Graphically
sts graph
stphplot
stcoxkm
Numerically
estat phtest
, tvc(varname)
2015-09-04 Viktor Oskarsson 3
Introduction II Common approaches to evaluate non-PHs (in Stata)
![Page 4: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/4.jpg)
Piecewise models
stsplit
, tvc(varname)
Stratified models
, strata(varname)
2015-09-04 Viktor Oskarsson 4
Introduction III Common approaches to handle non-PHs (in Stata)
![Page 5: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/5.jpg)
Piecewise models
stsplit
, tvc(varname)
Stratified models
, strata(varname)
Flexible functions
Restricted cubic splines (RCS)
Fractional polynomials
2015-09-04 Viktor Oskarsson 5
Introduction III Common approaches to handle non-PHs (in Stata)
![Page 6: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/6.jpg)
Cubic splines are piecewise-polynomial line segments joined together at knots
RCS are constrained to be linear before the first knot and/or after the final knot
2015-09-04 Viktor Oskarsson 6
Introduction IV Cubic splines
knot placement
![Page 7: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/7.jpg)
Introduce how RCS can be used in the evaluation of non-PHs in Cox
regression
Present a new Stata postestimation command (stphcoxrcs) that greatly
facilitates such an evaluation (both numerically and graphically)
Show a practical example of how to evaluate non-PHs using stphcoxrcs
2015-09-04 Viktor Oskarsson 7
Aim of the presentation
![Page 8: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/8.jpg)
First, the analysis time (_t) is split into narrow intervals (using stsplit)
Second, a flexible function of _t is modeled with RCS (using mkspline)
Third, an interaction is formed between the flexible function of _t and the
covariate of interest
2015-09-04 Viktor Oskarsson 8
How to use RCS in the evaluation of non-PHs I Preestimation
![Page 9: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/9.jpg)
Before splitting
After splitting
2015-09-04 Viktor Oskarsson 9
Splitting of _t
![Page 10: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/10.jpg)
First, the analysis time (_t) is split into narrow intervals (using stsplit)
Second, a flexible function of _t is modeled with RCS (using mkspline)
Third, an interaction is formed between the flexible function of _t and the
covariate of interest
2015-09-04 Viktor Oskarsson 10
How to use RCS in the evaluation of non-PHs I Preestimation (cont.)
![Page 11: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/11.jpg)
A full Cox model is fitted (including the aforementioned interaction terms) (using
stcox)
2015-09-04 Viktor Oskarsson 11
How to use RCS in the evaluation of non-PHs II Estimation
λ 𝑡 | X = λ0 𝑡 exp β1X + β2X × S1 𝑡 + β3X × S2 𝑡
![Page 12: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/12.jpg)
A joint test of the interaction terms is performed to numerically evaluate non-
PHs
A graph of the time-varying HRs is created to graphically evaluate non-PHs
2015-09-04 Viktor Oskarsson 12
How to use RCS in the evaluation of non-PHs III Postestimation
H0: β2 = β3 = 0
HR 𝑡 = exp β1 + β2 × S1 𝑡 + β3 × S2 𝑡
![Page 13: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/13.jpg)
_t is split using stsplit with the options splitevery(#) |
splitat(numlist). Default is splitat(failures)
The natural logarithm of _t is modeled with RCS using mkspline with the
option nknots(#). Default is nknots(3)
2015-09-04 Viktor Oskarsson 13
stphcoxrcs
stphcoxrcs tests the PH-assumption for a covariate (binary
or continuous) using RCS after fitting a model with stcox
![Page 14: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/14.jpg)
Data from a prospective cohort of Swedish women (n = 32,038; followed-up
between 1998-2011)
Cox regression on the association of fruit and vegetable consumption with risk
of symptomatic gallstone disease (n = 1120)
Fruit and vegetable consumption categorized into quartiles of consumption
(abbreviated as “fv_cat” in subsequent slides)
2015-09-04 Viktor Oskarsson 14
Practical example I Setting and research question
![Page 15: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/15.jpg)
stset
Attained age as time scale
stcox
Multivariable-adjusted for potential confounders (omitted from output for clarity)
2015-09-04 Viktor Oskarsson 15
Practical example II Cox regression
4 0.97 0.09 -0.33 0.7388 0.81 1.16
3 0.93 0.08 -0.81 0.4194 0.78 1.11
2 0.96 0.08 -0.47 0.6388 0.81 1.14
fv_cat
_t Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval]
![Page 16: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/16.jpg)
stset
Attained age as time scale
stcox
Multivariable-adjusted for potential confounders (omitted from output for clarity)
Postestimation: estat phtest, detail
2015-09-04 Viktor Oskarsson 16
Practical example II Cox regression (cont.)
4.fv_cat 0.07726 6.65 1 0.0099
3.fv_cat 0.01998 0.44 1 0.5074
2.fv_cat 0.01749 0.34 1 0.5603
1b.fv_cat . . 1 .
rho chi2 df Prob>chi2
![Page 17: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/17.jpg)
stphcoxrcs 4.fv_cat
2015-09-04 Viktor Oskarsson 17
Practical example III Evaluation of non-PHs using stphcoxrcs—test statistics
Note: time scale modeled using Restricted Cubic Splines with 3 knots
Prob > chi2 = 0.0021
chi2(2) = 12.29
Wald test of proportional-hazards assumption for i4.fv_cat
![Page 18: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/18.jpg)
stphcoxrcs 4.fv_cat
Practical example IV Evaluation of non-PHs using stphcoxrcs—graphics
Viktor Oskarsson 18 2015-09-04
![Page 19: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/19.jpg)
Main
nknots(#)
splitevery(#)
splitat(numlist)
Test statistics
ic
lrtest
Practical example V Evaluation of non-PHs using stphcoxrcs—options
Viktor Oskarsson 19 2015-09-04
![Page 20: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/20.jpg)
Graphics
level(#)
range(# #)
noci
noyref
nograph
gopts(twoway_options)
saving(filename [, replace])
Practical example V Evaluation of non-PHs using stphcoxrcs—options (cont.)
Viktor Oskarsson 20 2015-09-04
![Page 21: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/21.jpg)
2015-09-04 Viktor Oskarsson 21
Practical example VI Comparison of Cox models with different number of RCS-knots using stphcoxrcs
![Page 22: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/22.jpg)
2015-09-04 Viktor Oskarsson 22
Practical example VII Comparison of Cox models with different intervals of _t using stphcoxrcs
![Page 23: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/23.jpg)
In Cox regression, the assessment of PHs is important for the interpretation of
HRs and exposure-outcome associations
stphcoxrcs facilitates the use of RCS in the evaluation of non-PHs (both
numerically and graphically)
It is a useful complement to other approaches that are used to evaluate and/or
handle non-PHs
2015-09-04 Viktor Oskarsson 23
Summary
![Page 24: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/24.jpg)
Heinzl, H., & Kaider, A. (1997). Gaining more flexibility in Cox proportional
hazards regression models with cubic spline functions. Computer methods and
programs in biomedicine, 54(3), 201-208.
Therneau, T. M., & Grambsch, P. M. (2000). Modeling survival data: extending
the Cox model. Springer-Verlag. New York.
Royston, P., & Lambert, P. C. (2011). Flexible parametric survival analysis using
Stata: beyond the Cox model. Stata Press books.
2015-09-04 Viktor Oskarsson 24
References
![Page 25: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/25.jpg)
2015-09-04 Viktor Oskarsson 25
![Page 26: Viktor Oskarsson Andrea Discacciati Nicola Orsini · 2015. 9. 21. · Viktor Oskarsson Andrea Discacciati Nicola Orsini Viktor Oskarsson Unit of Nutritional Epidemiology and Unit](https://reader034.vdocuments.site/reader034/viewer/2022051904/5ff5274bcde317409957026f/html5/thumbnails/26.jpg)
2015-09-04 Viktor Oskarsson 26
Practical example II Cox regression (cont.)