Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

# 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.

904 questions
Filter by
Sorted by
Tagged with
38k 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 ...
8k 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 ...
15k 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 ...
18k 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....
7k 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 ...
1k 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 ...
14k 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 ...
16k 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 ...
28k 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 ...
1k 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 ...
8k 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 ...
12k 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 ...
4k 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 ...
18k 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 ...
7k 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 ...
1k 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 ...
18k 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 ...
2k 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 ...
16k 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 ...
12k 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 ...
3k 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, ...
9k 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 ...
3k 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 ...
2k 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 ...
3k 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 ...
3k 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 ...
38k 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 ...
4k 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 ...
6k 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 ...
2k views

### How do I interpret a Cox hazard model survival curve?

How do you interpret a survival curve from cox proportional hazard model? In this toy example, suppose we have a cox proportional hazard model on age variable in <...
3k 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 ...
10k views

### Cox proportional hazard model and interpretation of coefficients when higher case interaction is involved

Here is the summary-output of the Coxph-model I used (I used R and the output is based on the best final model i.e. all significant explanatory variables and their interactions are included): ...
2k views

### Cox proportional hazard model and non-randomly selected sample

Are there any methods to correct bias in Cox proportional hazard model caused by non-randomly selected sample (something like Heckman's correction)? Background: Lets say the situation looks as ...
3k 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 ...
10k 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 ...
1k views

### Structure of data and function call for recurrent event data with time-dependent variables

I'm attempting to estimate the effect of 2 drugs (drug1, drug2) on the likelihood of a patient falling (...
2k 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 ...
6k 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 ...
4k 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 ...
8k views

### Which model should I use for Cox proportional hazards with paired data?

I am hoping someone can help me with which model (frailty, strata or cluster) I should use for my data. I have paired data so I need to take that into account when modelling the Cox PH and am unsure ...
9k 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 ...
6k views

### Survival analysis in R with left-truncated data

I am doing a survival analysis in R with the survival package. I think I am working with left-truncated data, but I'm not entirely sure how to handle it. I have a ...
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 ...
2k views

### Joint Models vs the 'usual' time-dependent Cox regression for time-varying predictors

I've got a methodological question, and no data set attached. Suppose I aim to fit a proportional hazards model (Cox) for survival data. I have multiple observations for each individual (data in long ...
1k views

### Large scale Cox regression with R (Big Data)

I am trying to run a Cox regression on a sample 2,000,000 row dataset as follows using only R. This is a direct translation of a PHREG in SAS. The sample is representative of the structure of the ...
6k views

### High concordance in cox PH model even though PH assumption is violated

I am using Cox proportional hazards models for survival analysis. The specific reason I am interested in them is because they give a nice way to quantify effect size between groups via the hazard ...
4k 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 ...
6k views

### How to use time dependent covariates with cox regression in R

I don't know how to generate time dependent covariates in R for use cox regression. I know you need to reorganize your dataset into intervals between event times. This I believe I can do with the ...