Hazard ratio curves Does anyone know of a method to calculate and plot [absolute] hazard ratio curves over a continuous variable? I know of the 'smoothHR' package in R, but it uses an arbitrary reference value and I cannot get it to plot the absolute HR. What I am after is something like the figure 3 in this article: https://www.ncbi.nlm.nih.gov/pubmed/23900696 .
Also, does anyone know if this is an acceptable method for presenting HR? In my opinion it has a clear advantage over regressions with arbitrary cut-off values and presents a very informative curve for continuous variables.
 A: Methods that categorize continuous variables are invalid from many standpoints, and decidedly inefficient.  You can use a regression spline to model the continuous predictor effect and then plot it against log relative hazard, median survival time, 2-year survival probability, and other transformations of the outcome.  The R rms package makes this easy and there are extensive examples in my course notes you can find linked from http://biostat.mc.vanderbilt.edu/rms
I wouldn't use the term "absolute hazard ratio" but rather "relative hazard or relative log hazard".  You can't plot an actual hazard ratio without choosing a reference value.  I often choose the predictor median but plotting relative log hazard does away with that problem, i.e., plot the linear predictor $X\hat{\beta}$ for the model holding other predictors constant and varying the predictor of interest.
Dichtomizing a continuous variable is only appropriate if the variable has a discontinuous relationship with the outcome that is flat on both sides of the cutpoint.
The use of cutoffs involves improper conditioning, e.g., computing the probability of surviving 10 years given age > 70 as opposed to computing what is really needed: probability of surviving if age = 70.
A: Instead of using the hazard-ratio, you may use the survival probability directly. Fit a suitable model (such as the Cox proportional hazards regression model) first. If you need to adjust for confounding variables, include those in the regression model as independent variables. Use this method to perform g-computation for a lot of different values of time and specific variables of the continuous variable. This can then be plotted in different ways.
For example, this is a survival area plot, created using the method described above:

It shows the survival probability on the Y-axis, the time on the X-axis and distinguishes between values of the continuous variable using a continuous color scale.
This and other types of plots can be created using the method described above using the contsurvplot R package (https://cran.r-project.org/package=contsurvplot), as described in our preprint on this topic: https://arxiv.org/abs/2208.04644
