# Questions tagged [survival]

Survival analysis models time to event data, typically time to death or failure time. Censored data are a common problem for survival analyses.

3,385 questions
Filter by
Sorted by
Tagged with
33k views

### How to tell the probability of failure if there were no failures?

I was wondering if there is a way to tell the probability of something failing (a product) if we have 100,000 products in the field for 1 year and with no failures? What is the probability that one of ...
• 581
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 ...
• 563
25k views

### Survival Analysis tools in Python [closed]

I am wondering if there are any packages for python that is capable of performing survival analysis. I have been using the survival package in R but would like to port my work to python.
• 2,967
11k views

### References for survival analysis

I am looking for a good book/tutorial to learn about survival analysis. I am also interested in references on doing survival analysis in R.
10k views

### Why are survival times assumed to be exponentially distributed?

I am learning survival analysis from this post on UCLA IDRE and got tripped up at section 1.2.1. The tutorial says: ... if the survival times were known to be exponentially distributed, then the ...
• 37.2k
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 ...
• 645
32k views

### What distribution does my data follow?

Let us say that I have 1000 components and I have been collecting data on how many times these log a failure and each time they logged a failure, I am also keeping track of how long it took my team to ...
• 4,542
38k views

### Imputation before or after splitting into train and test?

I have a data set with N ~ 5000 and about 1/2 missing on at least one important variable. The main analytic method will be Cox proportional hazards. I plan to use multiple imputation. I will also be ...
• 125k
37k views

### Intuition for cumulative hazard function (survival analysis)

I'm trying to get intuition for each of the main functions in actuarial science (specifically for the Cox Proportional Hazards Model). Here's what I have so far: $f(x)$: starting at the start time, ...
• 485
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 ...
• 729
3k views

### Bayesian Survival Analysis: please, write me a prior for Kaplan Meier!

Consider right-censored observations, with events at times $t_1, t_2, \dots$. The number of susceptible individuals at time $i$ is $n_i$, and the number of events at time $i$ is $d_i$. The Kaplan-...
• 12.9k
3k views

### Why does the US death rate not "match" life expectancy

From the CDC (https://www.cdc.gov/nchs/fastats/deaths.htm): Death rate: 863.8 deaths per 100,000 population Life expectancy: 78.6 years Now in a static situation I ...
• 323
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 ...
• 623
2k views

### Should the y-axis on a survival plot go from 0 to 100 even if the lines are all above 0.9?

I am reviewing an article that includes a survival plot, with % survival on the y-axis and time on the x-axis. The y-axis goes from 0 to 100, but the two survival curves are both always above 90%. I ...
• 125k
13k views

### Survival analysis: continuous vs discrete time

I am confused about how to decide whether to treat time as continuous or discrete in survival analysis. Specifically, I want to use survival analysis to identify child- and household-level variables ...
• 211
86k views

### How do I interpret Exp(B) in Cox regression?

I'm a medical student trying to understand statistics(!) - so please be gentle! ;) I'm writing an essay containing a fair amount of statistical analysis including survival analysis (Kaplan-Meier, Log-...
• 459
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 ...
• 2,505
10k views

### Can Hazard Ratio be translated into ratio of medians of survival time?

In one paper describing results of survival analysis I have read a statement that implies that one can translate Hazard ratio (HR) into ratio of median survival times ($M_1$ and $M_2$) using the ...
• 2,200
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 ...
• 5,976
4k views

### Basic questions about discrete time survival analysis

I am attempting to carry out a discrete time survival analysis using a logistic regression model, and I'm not sure I completely understand the process. I would greatly appreciate assistance with a ...
• 361
32k views

### What is the difference between the "coef" and "(exp)coef" output of coxph in R?

I have been trying to discern what exactly the "coef" and "(exp)coef" output of coxph signify. It seems that the "(exp)coef" are comparisons of the first variable in the model according to the group ...
• 387
6k views

### Intuition behind the hazard rate

I am confused about the equation that serves as the definition of the hazard rate. I get the idea of what the hazard rate is, but I just don't see how the equation expresses that intuition. If $x$ is ...
• 193
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 ...
• 333
703 views

### How to calculate average length of adherence to vegetarianism when we only have survey data about current vegetarians?

A random population sample was surveyed. They were asked if they eat vegetarian diet. If they answered yes, they were also asked to specify how long they’ve been eating vegetarian diet without ...
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 ...
• 5,643
6k views

### In survival analysis, when should we use fully parametric models over semi-parametric ones?

This question is the counterpoint of the other question In survival analysis, why do we use semi-parametric models (Cox proportional hazards) instead of fully parametric models? Indeed, it clearly ...
• 1,430
21k views

### What are the differences between survival analysis and Poisson regression?

I'm working on a classical churn prediction problem using the number of visits of a given user to a site and I thought that Poisson Regression was the right tool for modelling the future engagement of ...
• 293
13k views

### What are the pros and cons of using the logrank vs. the Mantel-Haenszel method for computing the Hazard Ratio in survival analysis?

One way to summarize the comparison of two survival curves is to compute the hazard ratio (HR). There are (at least) two methods to compute this value. Logrank method. As part of the Kaplan-Meier ...
• 20.9k
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 ...
• 2,029
41k 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 ...
• 341
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 ...
• 810
13k views

### ML estimate of exponential distribution (with censored data)

In Survival Analysis, you assume the survival time of a r.v. $X_i$ to be exponentially distributed. Considering now that I have $x_1,\dots,x_n$ "outcomes" of i.i.d r.v.'s $X_i$. Only some proportion ...
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 ...
• 4,024
10k views

### Survival Model for Predicting Churn - Time-varying predictors?

I am looking to build a predictive model for predicting churn and looking to use a discrete time survival model fitted to a person-period training dataset (one row for each customer and discrete ...
• 8,760
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 ...
• 3,396
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 ...
• 2,140
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 ...
• 339
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 ...
• 459
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 ...
9k views

### How to do cross-validation with a Cox proportional hazards model?

Suppose I have constructed a prediction model for the occurrence of a particular disease in one dataset (the model building dataset) and now want to check how well the model works in a new dataset (...
• 17.4k
3k views

### Relationship between Gumbel and Weibull distribution, accelerated failure time models, and Survreg using R

I have three questions concerning accelerated failure time models (AFT), one statistical, one regarding how to implement these models in R, and one related to finding out information about what R is ...
• 728
16k views

### Weibull Survival Model in R

If I run a Weibull survival model in R with the code survreg(Surv(t,delta)~expalatory variables, dist="w") how do I interpret the output of the model? That is, ...
• 539
9k views

### How to simulate censored data

I'm wondering how can I simulate a sample of n Weibull distribution lifetimes that include Type I right-censored observations. For instance lets have the n = 3, shape = 3, scale = 1 and the censoring ...
• 141
6k views

### Training, testing, validating in a survival analysis problem

I've been browsing various threads here, but I don't think my exact question is answered. I have a dataset of ~50,000 students and their time to dropout. I am going to be performing proportional ...
• 125k
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 ...
• 832
2k views

### Compare two survival curves for paired data

I want to compare two different methods for detecting status change in a survival analysis. A group of subjects is being followed for a longer period (many years), and two examination methods have ...
• 361
28k views

### Proof of relationship between hazard rate, probability density, survival function

I am reading a bit on survival analyses and most textbooks state that $h(t)= \lim_{ \Delta t \rightarrow 0} \frac{P(t < T \leq t+\Delta t |T \geq t )}{ \Delta t} =\frac{f(t)}{1-F(t)} (1)$ ...
• 1,507
26k 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 ...
36k views

### Kaplan-Meier(K-M) vs. Cox Regression

I am very new to survival analysis. I am looking for differences between these two methods - Kaplan-Meier(K-M) vs. Cox Regression. KM Survival Analysis cannot use multiple predictors, whereas Cox ...
• 609