# 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,741 questions
Filter by
Sorted by
Tagged with
6 views

### discrete-time hazard model vs conditional logistic regression vs logistic regression

I was wondering what is the difference between these three models (discrete time cox proportional hazard, conditional logistic regression and logistic regression). I would appreciate it if you could ...
5 views

### Multi State Survival Analysis Transition Between States Triggered By different events

I have a state diagram for multistate survival analysis, and between 2 specific states, I have 2 types of transitions triggered by different types of events, i.e, from state 1 to state 2, the ...
16 views

### Moderator Analysis in Cox Regression

Imagine an RCT with two groups with a time-to-event endpoint. The (pre-specified) strategy for analysing this trial is a Cox Regression using common covariate adjustment to reduce outcome ...
• 141
1k 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 ...
• 141
80 views

### Why are my Hazard Ratio coefficients so large or small in Coxph regression?

I have some grade data for an institution I work at for a specific sub population and comparing it to retention over time. In the first table below are some hazard ratios from a coxph regression in R, ...
• 31
1 vote
39 views

### How to handle zero-inflated time in Cox proportional hazards model with categorical covariates?

I am using a Cox proportional hazards model to compare the time to an event, adjusting for several categorical variables (X1, X2, and X3). One of these variables, X3, is a three-level categorical ...
• 21
17 views

### Lifelines-CoxTimeVaryingFitter for Multistate Survival Analysis

I am new to survival analysis and cox regression, and have limited statistical background. I have time-to event data for a multistate survival model and I want to fit a cox model for each transition ...
1 vote
48 views

### Calculating the value of Cox-Snell Rsquared

I want to calculate the minimum sample size for a prospective longitudinal study (using cox regression - the aim of the project is prediction). The following function pmsampsize from the pmsampsize ...
• 121
35 views

### In which cases should the time be transformed when plotting the smoothed scaled Schoenfeld residual plot?

I previously asked this question but didn't get any answers, so I'm reposting it now. I aim to address the argument transform = '' in R, particularly concerning the ...
• 333
9 views

### Sample size for a discrete-time survival model with a time-dependent covariate

How can I calculate the sample size for a prediction model (Cox regression) when the survival time is discrete (up to 6 points) and there is also a time dependent variable (with three categories) in ...
1 vote
42 views

### Changes in Schoenfeld Residuals Dependent on Follow-Up Time

It's my understanding that the proportional hazards assumption means that the effect of a covariate on the hazard rate (or the instantaneous risk of an event) remains constant over time. In practice, ...
• 77
351 views

### Diagnosing an unexpected pattern in a survival curve plot

I am conducting a survival analysis (using Cox proportional hazards regression) in R. My overall sample has a ~10% mortality rate, but the Kaplan-Meier survival curves that are derived from my ...
• 77
1 vote
57 views

### Time-to-event analysis with left-truncation and right-censoring depending on the exposure

I have a couple of questions regarding the best unbiased approaches regarding analyzing time-to-event/age-of-onset for left-truncated with right-censoring data. To my understanding, when one is ...
• 45
13 views

### Sample size calculation for Cox regression for comparison of four treatment groups

I need to calculate the required sample size for a future study. We have 4 treatment groups, one of those will be the control group. The goal is to compare each of the 3 treatment groups to the ...
64 views

### Sample size and number of covariates in Cox regression

I am starting to work on survival analysis using Cox regression. Is there a formula or function (SAS; R) to figure out for a given number of sample sizes what would be the number of independent ...
• 121
1 vote
36 views

### Should the curve be around zero when assessing the smoothed scaled Schoenfeld residual plot for proportional hazard assumption?

I'm using the smoothed scaled Schoenfeld residual plot to assess the proportional hazard assumption. I have a decent understanding of what a smoothed scaled Schoenfeld residual plot shows, but I'm ...
• 333
10 views

### Longitudinal analysis

I have a question. Suppose that I want to analyze if a particular variable "X" affects the incidence of a disease "D," but I do not have the information about "D" at the ...
• 169
18 views

### Does it make sense to convert the Y-axis by exp() on the smooth scaled schoenfeld residual plot?

I posted a question on Stack Overflow. But the question got closed as the person who closed it wrote that it should belong here in Stack Exchange. I'm not sure why but here is the link for the post. I'...
• 333
10 views

### What should I do with RCS after finding non-linearity in a cox model

Hi I am conducting cox regression analysis. I found out with RCS macro on SAS that our variable 'systolic bp' has non-linearity issue. So, in this case how should I report the results? Our main ...
8 views

### Recurrent event model - time to multiple medication discontinuations

I am using the following recurrent event model (counting process style input) to plot cumulative mean frequency of multiple medication initiations. Just like patients in the study can initiate ...
16 views

### Prediction model for dataset whose variables are on two different levels (patient- and lesion-level)

I want to create a cox regression model for predicting follow-up outcomes (eg death) using my dataset. The issue is that my dataset has some variables that are patient-level (eg demographics) and some ...
25 views

### How to assess the goodness-of-fit of an extended Cox model?

I'm trying to build an extended Cox hazard model on a dataset with time-varying covariates, using Python's Lifeline package. However, I've a hard time trying to find out how I can assess the goodness-...
159 views

### Cox model - unsure of time unit of analysis

I am running a survival analysis (Cox model) on time to event in cancer patients. The start of followup is end of treatment. Tests for the event (recurrence) are performed every 6 months from cancer ...
• 819
22 views

### How to handle time to event data when there is a competing risk with very low incidence rate

I'm analysing time to event data. The primary outcome is time to discharge, and there is a competing risk of death. A competing risk model seems appropriate, but I was wondering if this still applies ...
• 651
11 views

### Cubic splines for Cox models

I have a question about cubic splines. I want to be sure that I understood correctly. When I perform a Cox model with proportional hazards, if I insert continous variables in the model I have to check ...
• 169
713 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 ...
• 169
1 vote
24 views

### Count data with time-varying covariates

One way to model count data is to simply count up the number of events as the outcome with an offset of observation time if this varies between people. I presume it's also possible to model count data ...
• 735
41 views

### Constructing nomogram from approximate model in Regression Modelling Strategies

In section 19.5 in Regression Modelling Strategies by Frank Harrell we make an approximate model using linear regression with ols. Since this is an ols object we have to calculate survival quantities ...
54 views

### Interpreting the result of post hoc power calculation with powerCT.default for proportinal hazards model

I have 2 samples of data both with over 800000 instances. . In both samples, ~ 75% of people have the exposure. In the first sample 0.3 % of people have an outcome and in the second 5% have an outcome....
• 315
29 views

### Linearity preservation after PCA covariate transformation

thank you for this interesting discussion about linearity of PCA. enter link description here I have a question, which I do not know if it's trivial or not, but I do need to clarify it. I want to fit ...
26 views

### Why would independences tests show significant correlation between variables while VIF shows no multicollinearity?

When conducting independence tests among the variables, some exhibit significant correlations, yet the VIF analysis indicates no multicollinearity. Is this common, and what implications does it hold ...
• 41
14 views

### Number of doses as a predictor in a Cox model

I have some data where time to having a relapse of a particular disease state is the outcome of interest. We are interested in assessing the 'effect' of a particular treatment on relapse risk - ...
• 735
30 views

### Fitting a Discrete-time survival analysis

I am trying to fit a discrete-time survival analysis using R. My overall goal is to check if the variable pain impacts smoking. Every time I include the variable ...
91 views

### Shrinkage of covariates in the Cox model

In a regression model (e.g Cox model) when there are too few events to support modeling all desired covariates / confounders, a possible solution is to apply shrinkage / penalise all but the exposure(...
• 819
32 views

### Discrete vs. Continuous Survival regression - for business case / subscription churn

I'm trying apply a survival analysis to a churn problem - customer subscriptions. There's nothing particularly unusual about these subscription - customers either pay, or leave, monthly, or annually, ...
• 283
78 views

### How should I be interpreting martingale residuals and zph?

I'm new to survival analysis and am practicing on the AIDS Clinical Trials Group Study 175 Data from the UCI Machine Learning Repository. After using R to fit the Cox PH model, I made a plot to look ...
• 41
144 views

### Multiple Imputation for missing outcomes in Cox regression

Imagine an RCT with a time-to-event outcome which is analyzed using a Cox regression. There are four assessments (T1=before randomization, T2=3 weeks, T3=6 weeks, T4=12 weeks). Under the censoring at ...
• 141
61 views

### Individual fixed effects for Cox Proportional Hazard model

I have a panel data set with right censoring. So I have individuals i with several time varying covariates Xit. For some individuals we observe event E (canceling their contract) and others we don't. ...
• 249
39 views

### When should the robust error function in R be used in Cox proportional hazard regressions?

Let's consider a scenario where I compute a HR that appears to violate the proportional hazard assumption according to the cox.zph test, but when plotting the ...
• 333
1 vote
46 views

### How do I interpret the HRs for each time interval computed by survSplit in R?

I’m testing the association between an exposure and outcome. I have performed a Cox proportional hazard model in R and estimated a HR. Both the exposure and the outcome are binary variables, where 1 = ...
• 333
13 views

### SNNs with low-moderate data requirements?

I've been looking into utilizing a survival neural network for my dataset, but am having difficulty finding a model that works with my relatively low amount of data. I have ~10 datapoints for ~300 ...
1 vote
42 views

### Estimate number of covariates in Cox regression model

My doubt about overfitting is almost general, but in this particular case is all about survival models. I am working in a case-cohort study, estimating the HR in a cohort where heart attack correspond ...
52 views

### How to include drug exposure periods in a time to event analysis?

I'm finding it difficult to settle on a method in the literature on how to deal with exposure time of being on a drug(s) (or not) on a future outcome. Let's say my outcome is death and I have ...
• 217
9 views

### Can Cox or Fine-Gray model include exposure that occurs during observation?

I'm making a Fine-Gray model about pregnancy, but I notice that some pregnancy complications may occur during the observation instead of at the beginning of it because those complications are often ...
• 1
14 views

### Need help in Censoring for Survival Analysis?

I have data of employees who joined in different months in last 3 years, assume it as a x month and out of those people people left in different months, assume this as y months. I have total 23000 ...
25 views

### Marginal structural model using PROC PHREG

I would like to fit a marginal structural model to account for treatment switching during follow-up. I found a great paper on how to do this in R: https://www.sciencedirect.com/science/article/abs/pii/...
• 615
44 views

### Cox Regression: handling immediate drop-outs

In an RCT with two groups, I‘m currently analyzing data using cox regression. While I‘m familiar with the concept of censoring, a rather substantial amount of participants (~32% and 35% in the groups) ...
• 141
15 views

### Is controlling for a time period (during which an economic crisis took place) controlling for fixed effects in a Cox extended model?

I'm using a Cox extended model to measure if job contract durations changed before or after labour reform A and B were passed. So the labour reform variable is time varying (0 if no reform, 1 if ...
• 21