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

2,461 questions
Filter by
Sorted by
Tagged with
22k 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 ...
24k 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.
47k 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 ...
10k 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.
8k 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 ...
26k 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 ...
18k 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 ...
23k 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 ...
29k 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, ...
2k 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-...
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 ...
11k 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 ...
81k 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-...
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 ...
8k 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 ...
17k 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 ...
11k 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 ...
2k 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 ...
13k 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 ...
27k 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 ...
5k 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 ...
9k 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 ...
30k 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 ...
9k 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 ...
16k 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 ...
21k 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 ...
9k 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 ...
534 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 ...
28k 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 ...
8k 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 (...
3k 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 ...
17k 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 ...
5k 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 ...
5k 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 ...
2k 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 ...
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 ...
25k 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)$ ...
9k 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

### 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 ...
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 ...
7k 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 ...
3k views

### A regression model whose response variable is the day of year that an annual event (usually) occurs

In this particular case I'm referring to the day on which a lake freezes. This "ice-on" date only occurs once a year, but sometimes it doesn't occur at all (if the winter is warm). So on one year the ...
596 views

### Big picture on survival analysis and life data analysis

I have heard of survival analysis and life data analysis, but don't quite get the big picture. I was wondering what topics they are covering? Is it pure statistics, or just application of ...
3k 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 ...
9k 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 ...
865 views

### Modelling when the dependent variable has a "cut-off"

Apologies in advance if any of the terminology I use is incorrect. I'd welcome any correction. If what I describe as a "cut-off" goes by a different name, let me know and I can update the question. ...
7k views

### How to compare median survival between groups?

I'm looking into median survival using Kaplan-Meier in different states for a type of cancer. There are quite big differences between the states. How can i compare the median survival between all the ...
18k 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 ...