The term Cox regression model (omitting proportional hazards) is sometimes used to describe the extension of the Cox model to include time-dependent factors. However, this usage is potentially ambiguous since the Cox proportional hazards model can itself be described as a regression model.
Questions tagged [cox-regression]
476 questions
4
votes
2 answers
Survival Analysis for Telecom Churn using R
I am working on Telecom Churn problem and here is my dataset.
http://www.sgi.com/tech/mlc/db/churn.data
Names - http://www.sgi.com/tech/mlc/db/churn.names
I'm new to survival analysis.Given the training data,my idea to build a survival model to…

maddy
- 113
- 2
- 8
4
votes
3 answers
Data Formatting for Time Varying Covariate Cox Proportional Hazards Modeling in R
I am attempting to develop a time varying Cox proportional hazards (CPH) model in R and was wondering if anyone has generated any code to help format data for the counting structure that is used in time varying / time dependent CPH models.
To make…

Entropy
- 378
- 6
- 16
4
votes
1 answer
Is there a way to get the partial likelihood of a Cox PH Model with new data and fixed coefficients?
I'm performing a cross validation on a competing risks proportional hazards model. With help from the mstate pacakge, I've prepared my data and am fitting it with survival::coxph. I get a fitted Cox model object for my training data, but I want to…

Gregor Thomas
- 136,190
- 20
- 167
- 294
4
votes
2 answers
Likelihood Ratio Test for Cox Models in R
Does anyone know of a likelihood ratio test, like lrtest in the lmtest package, that works for cox proportional hazards models produced using coxph? lrtest does not seem to work for coxph models.
Thanks

Dr Vicki
- 115
- 1
- 1
- 6
4
votes
1 answer
how to do predictions from cox survival model with time varying coefficients
I have built a survival cox-model, which includes a covariate * time interaction (non-proportionality detected).
I am now wondering how could I most easily get survival predictions from my model.
My model was specified:
coxph(formula =…

Chanter
- 41
- 2
3
votes
2 answers
how to report exp(coefs) of a coxph regression with stargazer
Say I have my.model
My.model <- coxph(Surv(stop, event) ~ (rx + size + number) * strata(enum),
cluster = id, bladder1)
I would like to create a model report table which contains exp(coefs) instead of coefs
stargazer(my.model)
is there a…

Macosso
- 1,352
- 5
- 22
3
votes
2 answers
survfit for stratified cox-model
I have a stratified cox-model and want predicted survival-curves for certain profiles, based on that model.
Now, because I'm working with a large dataset with a lot of strata, I want predictions for very specific strata only, to save time and…

Dries
- 470
- 4
- 24
3
votes
0 answers
Unable to plot p values when using facet.by from ggsurvplot. Error message: "variable lengths differ"
I have a problem that I don't know how to solve. And it seems to be related to my data set (or is it?). Indeed, I am actually able to plot different p values when using facet.by when I use your example from issue#205 via the "colon" data set.…

CroixJeremy_2
- 41
- 2
3
votes
1 answer
Plotting Cumulative Events from Adjusted Survival Curve in R
I am attempting to create an adjusted survival curve (from a Cox model) and would like to display this information as cumulative events.
I have attempted this:
library(survival)
data("ovarian")
library(survminer)
model<-coxph(Surv(futime, fustat) ~…

mindhabits
- 421
- 1
- 3
- 10
3
votes
1 answer
Stratified log-rank test in R for counting process form data?
Background: at half-year follow up times for 4y, patients may switch to a different medication group. To account for this, I've converted survival data into counting process form. I want to compare survival curves for medication groups A, B, and C.…

neal
- 33
- 5
3
votes
0 answers
Predicting the failure time based on Cox proportional hazard model
I am new to Stack Overflow! Sorry in advance if this is a stupid or confusing question.
I have a set of right censored longitudinal data (aka survival data) which contains workers' failure (resignation) time, work location and monthly salary. My…

Jeff.H
- 31
- 1
3
votes
1 answer
Setting reference group for Hazard Ratio computed using coxph function in R
when i run coxph(Surv(Time, Status)~Class, data = df) on data set like below it always sets the reference group by alphabetical order, in this case MutantA would be the reference group. Is there a way to tell it to make WT the reference group…

researcher15
- 31
- 1
- 1
- 2
3
votes
1 answer
Count-process datasets for Non-proportional Hazard (Cox) models with interaction variables
I am trying to run a nonproportional cox regression model featuring an interaction-with-time variable, as described in Chapter 15 (section 15.3) of Applied Longitudinal Data Analaysis by Singer and Willett. However I cannot seem to get answers that…

llewmills
- 2,959
- 3
- 31
- 58
3
votes
0 answers
Get Integrated Brier Score for each cycle using R library pec
I want to compare different models for survival analysis. To do so I use the "pec" R package. I use 10-fold cross validation. To compare the different models I run the model for 30 cycles. As result I can get the (i) Integrated Brier Score (IBS) of…

Coco
- 211
- 3
- 7
3
votes
1 answer
What is the default of the time transform function in the coxph command?
Short introduction:
A Cox Proportional Hazards (PH) model can be estimated with the coxph function of the survival package. An obvious requirement to get sensible results from this type of model is that the hazards are proportional, i.e., they are…

StatMan
- 596
- 1
- 6
- 13