Skip to main content
15 votes
Accepted

Interpreting R coxph() cox.zph()

zph() checks for proportionality assumption, by using the Schoenfeld residuals against the transformed time. Having very small p values indicates that there are ...
Yuval Spiegler's user avatar
15 votes

Schoenfeld residuals - Plain English explanation, please!

What's plotted starts with a variance-weighted transformation of the Schoenfeld residuals for a covariate, into what are called "scaled Schoenfeld residuals." Those are then added to the ...
EdM's user avatar
  • 94.6k
12 votes

Extended Cox model and cox.zph

An extended Cox model is really technically the same as a regular Cox model. If your data set is properly constructed to accommodate time dependent covariates (multiple rows per subject, start and end ...
Yuval Spiegler's user avatar
9 votes

Extended Cox model and cox.zph

This question deserves a more up-to-date answer on a few accounts. First, the cox.zph() function has substantially changed with recent versions of the survival ...
EdM's user avatar
  • 94.6k
9 votes

hazard ratio: are they normally distributed?

The gold standard in the frequentist world is the profile likelihood interval, but for the Cox model the log likelihood is very quadratic in shape with respect to the log hazard ratio. So a normal ...
Frank Harrell's user avatar
7 votes

Schoenfeld test (cox.zph) shows no covariate violates PH assumption but global test suggests whole model does (p<0.001). What to do?

Note that the p values from cox.zph() shouldn't be thought of in the same way that you use p values in standard tests of null hypotheses. The burden is on you to ...
EdM's user avatar
  • 94.6k
6 votes
Accepted

Proportional hazards assumption and time-dependent covariates

If we add time-dependent covariates or interactions with time to the Cox proportional hazards model, then it is not a “proportional hazards” model any longer. See this presentation: http://ms.uky....
Serpico's user avatar
  • 126
6 votes

Recommendations for Non-Proportional Hazards

You certainly don't have marginal proportional hazards. That does not mean you don't have conditional proportional hazards! To explain in more depth, consider the following situation: let's suppose ...
Cliff AB's user avatar
  • 21.4k
6 votes
Accepted

Use median survival time to calculate CPH c-statistic?

Author of lifelines here. First thing: But, instead of a predicted survival time, it appears to use the predicted partial hazard (i.e., $\exp \beta^T x$) I actually use the negative of this ...
Cam.Davidson.Pilon's user avatar
6 votes

What does 'km' transform in cox.zph function mean?

km stands for Kaplan-Meier estimator. $$\hat{S}(t) = \prod_{i: t_i \le t}\left(1-\frac{d_i}{n_i} \right)$$ with $t_{i}$ a time when at least one event happened, $d_i$ the number of events (i.e., ...
Siong Thye Goh's user avatar
6 votes

What does 'km' transform in cox.zph function mean?

Like the original poster, I also wondered what, exactly, is the transformation "based on the Kaplan-Meier estimate" doing? Tracking this down proved to be more difficult than you would ...
Nobody's user avatar
  • 2,055
6 votes
Accepted

Is the effect in a Cox proportional hazard collapsible if the covariates are normally distributed and the baseline hazard is constant?

Maths is hard, so I would always start by checking this sort of thing with simulation ...
Thomas Lumley's user avatar
5 votes
Accepted

How to interpret HR under non-ph

Let's look at this for a single binary predictor, coded A and B, since that's hard enough. The hazard ratio $e^\beta$, the ratio of the hazard in group A to the hazard in group B, solves this equation....
Thomas Lumley's user avatar
5 votes
Accepted

Cox regression assessing joint relationship between baseline groups? JAMA example

This is not a bivariate Cox model. It is a Cox model with two predictors ("multiple" not "multivariate"). "Bivariate" is an unfortunate use of terminology. Nor is it even ...
Thomas Lumley's user avatar
5 votes

Likelihood term in Cox Proportional Hazards Model

The $h()$ is not a probability, it is a hazard, although they are monotonically related. The Cox model is not a full likelihood procedure, it maximizes a partial likelihood. Even though we don't ...
AdamO's user avatar
  • 63.5k
5 votes

Constructing hazard for x-year survival in cox models

Do you estimate impact of the risk factors (and chances of survival depending on the risk factors) or overall survival rate for this group of patients? For the latter you can take Kaplan-Meier ...
DianaS's user avatar
  • 438
5 votes

Plot of hazard ratio for primary endpoint and continuous covariate

require(rms) dd <- datadist(mydata); options(datadist='dd') f <- cph(Surv(time, event) ~ rcs(glucose, 4), data=mydata) ggplot(Predict(f)) To have more ...
Frank Harrell's user avatar
5 votes

Cox Proportional Hazards: Why p < 0.1 in univariate to be included in the multivariate

Omitting any outcome-associated predictor from a Cox multiple-regression* model runs a risk of omitted-variable bias. Unlike the situation with ordinary least squares discussed in that linked ...
EdM's user avatar
  • 94.6k
5 votes
Accepted

Schoenfeld residuals for factors with cox.zph

First, it's important to distinguish between the Schoenfeld residuals themselves and the score tests for trends of residuals over time that are used (starting with version 3 of the ...
EdM's user avatar
  • 94.6k
5 votes

Testing the proportional hazards assumption with a time varying covariate

I don't know the origin of the idea that Schoenfeld residuals can't be used for testing proportional hazards (PH) with time-varying covariate values. As Therneau and Grambsch say in Section 4.6: ...
EdM's user avatar
  • 94.6k
5 votes

Interpretation of R output for stratified cox-ph model

When you use strata(sex), coxph should estimate a separate hazard for males and females. There is no need to include ...
Demetri Pananos's user avatar
4 votes
Accepted

Testing proportional hazards assumption in parametric models

A complete answer depends on the nature of your parametric survival model. If your parametric model incorporates covariates in a way that the relative hazards for any 2 sets of covariates are in a ...
EdM's user avatar
  • 94.6k
4 votes

Does the proportional hazards assumption still matter if the covariate is time-dependent?

I may be wrong but I believe that Björn's answer is not completely correct. The proportional hazards assumption means that the ratio of the hazard for a particular group of observations (determined by ...
Lino Ferreira's user avatar
4 votes

Does the proportional hazards assumption still matter if the covariate is time-dependent?

You are still assuming that the effect of the value at each covariates/factor at each timepoint is the same, you simply allow the covariate to vary its value over time (but the change in the log-...
Björn's user avatar
  • 33.3k
4 votes

Cox proportional model with multiple failures for same subjects

This is more of a recurrent events or count data scenario and there is a huge literature on this topic. In general, you will have to assume a dependence across observations from the same object / ...
Björn's user avatar
  • 33.3k
4 votes

Proportional hazards vs proportional odds for modeling ordinal data

The two approaches for handling either continuous or ordinal responses make the same amount of assumptions. I have a detailed case study in the 2nd edition of Regression Modeling Strategies for which ...
Frank Harrell's user avatar
4 votes

Interpret hazard ratio that has huge value

Let's start with the main question, the interpretation of extremely high hazard ratios (HRs). As implicit in the comment from @Penguin_Knight, this is simply an issue of scales like, for example, in ...
EdM's user avatar
  • 94.6k
4 votes
Accepted

Recommendations for Non-Proportional Hazards

Fantastic question fantastic answers. I'll add that you should consider a model making much different assumptions such as the lognormal survival model. Use the normal inverse function for the y_axis ...
Frank Harrell's user avatar
4 votes
Accepted

Expected survival time for Weibull proportional hazards model with R's predict.survreg

Your question is somewhat related to this question and particularly this question and the following answer by Therneau, Terry M. The survreg routine assumes that log(y) ~ covariates + error. ...
Benjamin Christoffersen's user avatar
4 votes

What is the meaning of "t" in Cox hazard proportional model?

It's time to survive from time $t=0$. You can calculate the different quantities, such as rate of death (hazard) at time t, or cumulative probability to survive from time $t=0$ to time t, from time $t=...
Aksakal's user avatar
  • 61.7k

Only top scored, non community-wiki answers of a minimum length are eligible