Skip to main content

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.

Filter by
Sorted by
Tagged with
13 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 ...
Ben Bolker's user avatar
  • 44.1k
4 votes
2 answers
3k views

log transform fixed PH in Cox model - how?

I have survival data to which I am fitting a Cox model with a continuous predictor. The cumulative martingale residual method (supremum test) of Lin, Wei and Ying suggested that both proportional ...
user3156942's user avatar
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 ...
Marja's user avatar
  • 563
7 votes
3 answers
3k views

Predictions using CoxTimeVaryingFitter for survival analysis in Python

For a customer churn analysis , i am building a time varying cox model in Python (available under lifelines package) to predict survival probabilities. The model object CoxTimeVaryingFitter() ...
swat's user avatar
  • 71
3 votes
2 answers
3k views

Why and how does adding an interaction term affects the confidence interval of a main effect?

I was wondering why, in a regression model including an interaction term, the confidence interval of one of the main effects becomes wider. Consider this Cox regression, where the variable IR_BMI27 ...
torwart's user avatar
  • 305
4 votes
2 answers
20k views

Backward selection for Cox model using R

I want to perform an exploratory Cox regression analysis of medical data using R. I am practicing using the pbc data from the survival function. Would you recommend performing a backward selection ...
Gurkenhals's user avatar
9 votes
1 answer
17k 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 ...
user333336's user avatar
2 votes
2 answers
2k views

Survival Analysis, Cox Regression in randomized trial vs. observational study and propensity score matching

In randomized clinical trials in the efficacy part, often survival analysis is used to analyze the time-to-event data. Since it is randomized (if randomization was done properly) one can assume that ...
Stat Tistician's user avatar
10 votes
2 answers
10k 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 ...
Finance's user avatar
  • 101
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....
Dihan's user avatar
  • 337
6 votes
1 answer
6k views

Cox PH linearity assumption: reading martingal residual plots

According to a lot of ressources about Cox PH model, continuous numeric variables should be tested for linearity assymption by plotting the Martingale residuals. In R, you can use ...
Dan Chaltiel's user avatar
  • 1,440
15 votes
3 answers
22k 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 ...
stats_newb's user avatar
8 votes
1 answer
18k views

Test Cox proportional hazard assumption (Bad Schoenfeld residuals)

Using R I generated a Cox model looking like this ...
Marcel's user avatar
  • 349
6 votes
1 answer
840 views

Robust error estimation and hazard ratio with non-proportional hazards

I recall having heard that the hazard ratio, estimated in a Cox model, can be made robust against the parallel hazard functions assumption. The key to this is using a Huber-White, or Huber-Eicker-...
AdamO's user avatar
  • 63.4k
4 votes
2 answers
6k views

The logrank test statistic is equivalent to the score of a Cox regression. Is there an advantage of using a logrank test over a Cox regression?

I have understood the logrank test as a "safe" or "conservative" way to check for a difference between two survival curves. It is "safe" in the sense that it is a ...
Eli's user avatar
  • 2,662
3 votes
1 answer
5k views

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

Using cox.zph (part of the survival package), I find that no covariate violates the PH assumption in a Cox regression model (p > ...
neal's user avatar
  • 31
1 vote
1 answer
1k views

Is it possible and how to predict individual survival curve after Cox regression?

Taking the veteran dataset of a two-treatment, randomized trial for lung cancer in the R package survival as an example, where <...
Matthew Hui's user avatar
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 ...
Max Gordon's user avatar
  • 5,946
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 ...
RustyStatistician's user avatar
6 votes
2 answers
2k views

Cox Regression when survival doesn't go to 0?

Is it appropriate to use cox regression to study a process that doesn't result in the survival function going to 0 when time = infinity? Cox regression is interested in hazard ratios, and it makes no ...
John Chrysostom's user avatar
6 votes
1 answer
5k views

Time to event with no censoring - use survival or normal regression?

I have some time to event data, but the population is only those who had the event (specifically, my cohort is all kidney tx recipients who were readmitted within one year of discharge for a specific ...
Scott Jackson's user avatar
6 votes
1 answer
11k views

How to compute partial log-likelihood function in Cox proportional hazards model?

The partial log-likelihood function in Cox proportional hazards is given with such formula $${}_{p}\ell(\beta) = \sum\limits_{i=1}^{K}X_i'\beta - \sum\limits_{i=1}^{K}\log\Big(\sum\limits_{l\in \...
Marcin's user avatar
  • 1,049
3 votes
2 answers
1k views

Textbook approach to modeling non-proportional hazards in the Cox model

In Cox models with time varying coefficients, the effect of covariates on the hazard is allowed to change through time. In cases where a coefficient has a linear relationship with time, I am aware of ...
SlowLoris's user avatar
  • 1,086
38 votes
1 answer
13k 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 ...
Julie's user avatar
  • 563
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 ...
user1956609's user avatar
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 ...
user avatar
2 votes
1 answer
1k views

Estimating survival curves from Cox regression results

I can understand that it is possible to estimate survival curves directly from the results of a Cox regression. The way it can be done, mathematically, is furthermore very nicely explained in this ...
kurv17's user avatar
  • 21
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 ...
Jonah Sinick's user avatar
12 votes
2 answers
6k 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 ...
wcampbell's user avatar
  • 2,197
7 votes
1 answer
5k views

Relative importance of variables in Cox regression

I've understood that relative importance of predictors is a tricky question. Suggested methods range from very complex models to very simple variable transformations. I've understood that the ...
Adam Robinsson's user avatar
7 votes
2 answers
4k views

Checking the proportional hazard assumption

I have a question on the cox proportional hazard model, in particular the proportionality assumption. I use cox.zph() function in R to check whether the proportionality assumption is satisfied. The ...
soeci92's user avatar
  • 83
4 votes
1 answer
3k views

Violation of the proportional hazard assumption, interaction with time. Am I taking the correct steps?

I will try to keep my question as short as possible. For my thesis I am researching if a risk score can predict graft failure in a cohort of $596$ patients over the course of $10$ years. (The ...
MargotP's user avatar
  • 43
1 vote
1 answer
1k views

Cox Model and proportional hazards

I'm trying to fit a Cox model, but there is some problems. I have the following variables in the model. Group: 1, 2, ..., 9 Sex: 1 female and 0 male Weight Age The first thing that I did is split ...
user avatar
1 vote
1 answer
2k views

Testing the validity of a Cox Time-Varying regression model in Python Lifelines

Using the lifelines library for python, I've fitted a Cox Time-varying regression to some customer data, to see which coefficients have an effect on customer churn. The dataset is a combination of ...
Hossing_Kommune's user avatar
1 vote
1 answer
5k views

Why are SPSS and R producing different results for a cox regression on the same data, with the same model specification?

I've performed a cox regression in rstudio (version 1.0.136) using the coxph function in the package "OIsurv". I've also performed the same analysis on SPSS using the same dataset, but i keep on ...
GaryStats's user avatar
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 ...
user4673's user avatar
  • 1,661
23 votes
4 answers
4k 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 ...
logjammin's user avatar
  • 729
17 votes
2 answers
40k 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 ...
elong's user avatar
  • 341
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 ...
ledzep's user avatar
  • 339
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 ...
ATJ's user avatar
  • 1,881
8 votes
2 answers
8k views

What is a "good fit" Brier score and Harrell's C Index

This is a question I originally posted on r-help but it is more suited here. I will post the question and the answer I received from Dr. Winsemius and would be most grateful for any additional answers ...
user2387584's user avatar
8 votes
3 answers
6k views

Weibull Survival Model with Time Varying Covariates in R

I am trying to run a survival model using the Weibull approach, but the wrinkle is that I have time-varying covariates. I am using the survival package in R. My call is: ...
george's user avatar
  • 81
8 votes
3 answers
16k views

Computing c-index for an external validation of a Cox PH model with R

First off, I'll state that I'm aware many questions get asked about the c-index. I've searched this site and others, and I haven't found an answer for my situation. I can successfully use ...
JJM's user avatar
  • 887
5 votes
1 answer
138 views

How to interpret HR under non-ph

How do I interpret a HR under non-proportional hazards? Sounds silly, but I couldn't find a clear answer. Allison 2014 calls it a rough average. How is this average rough, and not a real average of ...
Cardinal's user avatar
  • 320
5 votes
2 answers
999 views

"Examining the data" before analysis: I still don't know what I'm looking for

I am a recent graduate of a biostatistics program working as an analyst for health-related studies. We were taught to always "examine the data" before conducting an analysis by generating summary ...
NewEpi's user avatar
  • 51
5 votes
1 answer
4k views

Best predictive Cox regression model using c-index and cross-validation

I have a set of 40 genes expression data as binary variables (overexpressed yes or not) for predict recurrence in a kind of cancer in a sample of 77 patients, where 22 has recurred. This set is called ...
Jesus Herranz Valera's user avatar
4 votes
3 answers
5k views

Proportional hazards assumption and time-dependent covariates

Is there a way to check that the proportional hazards assumption is correct for a Cox model with time-varying covariates ?
yoyo's user avatar
  • 593
3 votes
1 answer
3k views

Cox model vs. Fine-Gray: hazard ratios & predicted cumulative incidence under competing risks

I am unclear about deriving both hazard ratios and a predicted cumulative incidence curves under competing risks. After reading this interesting article: https://statisticalhorizons.com/for-causal-...
user167591's user avatar
2 votes
2 answers
1k views

Which method of handling non-proportional hazards (here: crossed KM curves in 2+ points) would you prefer?

I have an experiment, where I compare two groups over time in frames of the time to event analysis. The Kaplan-Meier curves cross 3 times. It means, that the hazards ratios switch to the opposite side ...
OverTheRainbow's user avatar
2 votes
2 answers
1k views

Is is acceptable to use cox proportional hazard regression when time-to-event is a discrete, numeric variable?

I recently submitted a paper where I performed a cox proportional hazards regression model modelling the effect of group allocation in a randomised controlled trial on treatment retention. The event ...
llewmills's user avatar
  • 2,161

1
2 3 4 5 6