Questions tagged [cox-model]
Cox proportional hazards regression is a semi-parametric method for survival analysis. No distributional form needs to be assumed, only that the effect of one-unit increase in a covariate is a constant multiple.
1,772 questions
56
votes
5
answers
56k
views
Prediction in Cox regression
I am doing a multivariate Cox regression, I have my significant independent variables and beta values. The model fits to my data very well.
Now, I would like to use my model and predict the survival ...
38
votes
1
answer
14k
views
Does Cox Regression have an underlying Poisson distribution?
Our small team was having a discussion and got stuck. Does anyone know whether Cox regression has an underlying Poisson distribution. We had a debate that maybe Cox regression with constant time at ...
37
votes
2
answers
21k
views
In survival analysis, why do we use semi-parametric models (Cox proportional hazards) instead of fully parametric models?
I've been studying the Cox Proportional Hazards model, and this question is glossed over in most texts.
Cox proposed fitting the coefficients of the Hazard function using a partial likelihood ...
28
votes
1
answer
27k
views
How to interpret the output of predict.coxph?
After fitting a coxmodel it is possible to make predictions and retrieve the relative risk of new data. What I don't understand is how the relative risk is computed for an individual and what is it ...
24
votes
4
answers
5k
views
How do survival models "account for censoring"? (Do they?)
Background
I'm teaching an intro stats class in our social / health sciences department and I'm finding myself tripped up on something I'd always taken for granted: namely, the claim that survival ...
22
votes
3
answers
17k
views
How to get predictions in terms of survival time from a Cox PH model?
I want to develop a prediction model (Cox PH) for all-cause mortality in a dataset of participants of whom (almost) all have died at the end of follow-up (e.g. 1-year).
Instead of predicting the ...
21
votes
1
answer
26k
views
Cox baseline hazard
Let's say I have a "kidney catheter" data set. I'm trying to model a survival curve using a Cox model. If I consider a Cox model: $$h(t,Z) = h_0 \exp(b'Z),$$ I need the estimate of the baseline hazard....
20
votes
2
answers
10k
views
What is the "$R^2$" value given in the summary of a coxph model in R
What is the $R^2$ value given in the summary of a coxph model in R?
For example,
Rsquare= 0.186 (max possible= 0.991 )
I foolishly included it a manuscript as ...
20
votes
3
answers
19k
views
Time dependent coefficients in R - how to do it?
Update: Sorry for another update but I've found some possible solutions with fractional polynomials and the competing risk-package that I need some help with.
The problem
I can't find an easy way to ...
19
votes
1
answer
3k
views
Why are p-values often higher in a Cox proportional hazard model than in logistic regression?
I've been learning about the Cox proportional hazard model. I have a lot of experience fitting logistic regression models, and so to build intuition I've been comparing models fit using ...
19
votes
3
answers
10k
views
How can machine learning models (GBM, NN etc.) be used for survival analysis?
I know that traditional statistical models like Cox Proportional Hazards regression & some Kaplan-Meier models can be used to predict days till next occurrence of an event say failure etc. i.e ...
18
votes
2
answers
42k
views
How to estimate baseline hazard function in Cox Model with R
I need to estimate baseline hazard function $\lambda_0(t)$ in a time dependent Cox model
$\lambda(t) = \lambda_0(t) \exp(Z(t)'\beta)$
While I took Survival course, I remember that the direct ...
18
votes
2
answers
7k
views
Layman's explanation of censoring in survival analysis
I have read about what censoring is and how it needs to be accounted for in survival analysis but I would like to hear a less mathematical definition of it and a more intuitive definition (pictures ...
17
votes
1
answer
15k
views
What is the difference between the different types of residuals in survival analysis (Cox regression)?
I am fairly new to survival analysis. I was advised to look up and learn Schoenfeld residuals as part of a model diagnosis to see if the proportional hazard assumption has been satisfied. Whilst ...
17
votes
3
answers
31k
views
Cox model vs logistic regression
Let's say we are given the following problem:
Predict which clients are most likely to stop buying in our shop in next 3 months.
For each client we know the month when one started to buy in our ...
16
votes
3
answers
13k
views
How to report hazard ratios from a Cox proportional hazards model in English?
My understanding is that a hazard ratio from a Cox proportional hazards model compares the effect on the hazard rate of a given factor to a reference group. How would you report that to an audience ...
16
votes
2
answers
22k
views
Interpretation and validation of a Cox proportional hazards regression model using R in plain English
Can someone explain my Cox model to me in plain English?
I fitted the following Cox regression model to all of my data using the cph function. My data are saved ...
16
votes
1
answer
4k
views
How to generate predicted survivor curves from frailty models (using R coxph)?
I want to compute predicted survivor function for a Cox proportional hazards
model with frailty terms [using survival package]. It appears that when
frailty terms are in the model, the predicted ...
15
votes
3
answers
23k
views
How to create a toy survival (time to event) data with right censoring
I wish to create a toy survival (time to event) data which is right censored and follows some distribution with proportional hazards and constant baseline hazard.
I created the data as follows, but I ...
15
votes
2
answers
8k
views
Kaplan-Meier curves seem to say otherwise than the Cox regression
In R, I am doing survival data analysis of cancer patients.
I have been reading very helpful stuff about survival analysis in CrossValidated and other places and think I understood how to interpret ...
15
votes
3
answers
2k
views
What are the options in proportional hazard regression model when Schoenfeld residuals are not good?
I am doing a Cox proportional hazards regression in R using coxph, which includes many variables. The Martingale residuals look great, and the Schoenfeld residuals ...
14
votes
4
answers
969
views
Cubic splines in Cox model
I have a question about the cubic splines used in the Cox model to test the linearity for the continuous variables. I read that usually the knots chosen are the quantiles. Can you find different ...
14
votes
2
answers
59k
views
Is there any functional difference between an odds ratio and hazard ratio?
In logistic regression, an odds ratio of 2 means that the event is 2 time more probable given a one-unit increase in the predictor. In Cox regression, a hazard ratio of 2 means the event will occur ...
14
votes
1
answer
2k
views
proportional hazards model with fixed interval censoring = cloglog GLM with fixed effect of time?
Consider a survival analysis with time-constant coefficients, interval-censored, where the observation intervals are consistent across all individuals (e.g. each individual is observed at the end of ...
14
votes
2
answers
3k
views
Does fitting Cox-model with strata and strata-covariate interaction differ from fitting two Cox models?
In Regression Modeling Strategies by Harrell (second edition) there is a section (S. 20.1.7) discussing Cox models including an interaction between a covariate whose main effect on survival we want to ...
13
votes
1
answer
27k
views
Understanding coxph output in R
I am attempting to fit a Cox proportional hazard model to my data. I think I have the formula correct but am having trouble understanding the output. I have tried looked through the documentation ...
12
votes
2
answers
20k
views
How to calculate predicted hazard rates from a Cox PH model?
I have the following Cox PH model:
(Time, Event) ~ X + Y + Z
I would like to get the predicted hazard rates (i am talking about hazard rates NOT hazard ratios) given specific values of ...
12
votes
2
answers
7k
views
Interval censored Cox proportional hazards model in R
Given interval censored survival times, how do I perform an interval censored Cox PH model in R? An rseek search turns up the package ...
12
votes
1
answer
11k
views
Schoenfeld residuals
In a Cox proportional hazards model with many variables, if the Schoenfeld residuals are not flat for one of the variables, does this invalidate the entire model or can just the poorly-performing ...
11
votes
2
answers
11k
views
Extended Cox model and cox.zph
I have previously had experience only with Cox PH model and its assumptions checking.
Now for the first time I have my clients data with most of the covariates varying in time, only a few are fixed ...
11
votes
1
answer
768
views
SAS and R produced different results for the same cox ph model on the same data
I have fitted a Cox ph model using both R 4.3.1 and SAS 9.4 with the same data. In SAS, I used Proc phreg, while coxph function ...
11
votes
2
answers
14k
views
Precisely how does R's coxph() handle repeated measures?
Context
I'm attempting to understand how R's coxph() accepts and handles repeated entries for subjects (or patient/customer if you prefer). Some call this Long format, others call it 'repeated ...
11
votes
1
answer
4k
views
How to assess the proportional hazards assumption for a continous variable
I am having a problem with checking the assumptions for a continuous variable in a proportional hazards model. If a variable were a factor with many levels, then I could use the logrank test or check ...
11
votes
1
answer
20k
views
Schoenfeld residuals - Plain English explanation, please!
I have created a Cox model for lung adenocarcinoma patients. Several variables make up the model and I have assessed whether or not the proportional hazards assumption holds.
Using the cox.zph ...
11
votes
4
answers
4k
views
How best to analyze length of stay data in a hospital-based RCT?
I am interested in knowing whether or not there is a consensus about the optimal way to analyze hospital length of stay (LOS) data from a RCT. This is typically a very right-skewed distribution, ...
11
votes
2
answers
4k
views
Propensity score weighting in Cox PH analysis and covariate selection
Regarding propensity score weighting (IPTW) when doing Cox proportional hazard modeling of time-to-event survival data:
I have prospective registry data where we're interested in looking at treatment ...
11
votes
2
answers
12k
views
What is the relationship between the Harrel's C and the AUC?
I model survival outcomes using a Cox proportional hazards model and want to evaluate model fit.
Harrel's concordance index C is defined as the proportion of observations that the model can order ...
11
votes
1
answer
2k
views
Sample size and cross-validation methods for Cox regression predictive models
I have a question I would like to pose to the community. I have recently been asked to provide statistical analysis for a tumor marker prognostic study. I have primarily used these two references to ...
11
votes
1
answer
15k
views
Different prediction plot from survival coxph and rms cph
I've created my own slightly enhanced version of the termplot that I use in this example, you can find it here. I've previously posted on SO but the more I think about it I believe that this probably ...
10
votes
3
answers
2k
views
How to explain Hazard Ratio in layperson's terms
In the context of a Cox regression, I recently heard someone say that "the hazard ratio of 0.70 between the two treatment groups indicates that, during the whole followup time, of 100 persons in ...
10
votes
4
answers
5k
views
Adjust for everything you have in propensity score?
I have a methodological question, and therefore no sample dataset is attached.
I'm planning to do a propensity score adjusted Cox regression that aims to examine whether a certain drug will reduce ...
10
votes
2
answers
25k
views
coxph ran out of iterations and did not converge
Yes, I have checked that previous answers to "Ran out of iterations..." questions do not solve my problem.
I have fault data on Firefox, 899 faults and 1395 (estimated) censored faults. The ...
10
votes
2
answers
7k
views
Calibration of Cox regression survival analysis
To perform calibration of a Cox regression model (i.e. assessing for the agreement between the predicted and the observed outcome), what is the best method to present the accuracy of the model in ...
10
votes
2
answers
7k
views
Using multiple imputation for Cox proportional hazards, then validating with rms package?
I've been researching the mice package, and I haven't yet discovered a way to use the multiple imputations to make a Cox model, then validate that model with the rms package's ...
10
votes
1
answer
9k
views
Calculate incidence rates using poisson model: relation to hazard ratio from Cox PH model
I want to calculate incidence rates to present along hazard ratio's in order to present both relative and absolute measures of risk. I saw in other studies that such incidence rates can be calculated ...
10
votes
2
answers
6k
views
Recommendations for Non-Proportional Hazards
This is an issue that has plagued me for a long time and I have found no good answers in textbooks, Google, or Stack Exchange.
I have data set of >100,000 patients for which four treatments are ...
10
votes
1
answer
5k
views
How to generate survival data with time dependent covariates using R
I want to generate survival time from a Cox proportional hazards model that contains time dependent covariate. The model is
$h(t|X_i) =h_0(t) \exp(\gamma X_i + \alpha m_{i}(t))$
where $X_i$ is ...
10
votes
1
answer
3k
views
Comparison of CPH, accelerated failure time model or neural networks for survival analysis
I am new to survival analysis and I've recently learned that there are different ways to do it given a certain goal. I am interested in actual implementation and appropriateness of these methods.
I ...
10
votes
1
answer
3k
views
Error “system is computationally singular” when running cox.zph for a Cox Model
I have built an extended Cox Model in R, with time-dependent covariates, as described in this R vignette.
I have built the model by running the following:
...
9
votes
2
answers
31k
views
stratification in cox model
I am trying to understand difference in output between the following lines of code:
...