Questions tagged [survival-analysis]
Survival analysis is the statistics of censored time to event data, to which standard regression and classification techniques generally do not apply, due to the uncertain group memberships of the observations. The name originated from biological systems where the outcome of interest was indeed survival or death, but the concept applies equally well to mechanical failure, economic events or other types of prognostication.
survival-analysis
1,308
questions
1
vote
2
answers
26
views
How to get the probability data from survfit function?
I plot cumulative incidence curves based on data from the survival::survfit() function. Following this vignette I do something like the following:
library(survival)
mgus2$etime <- with(mgus2, ...
0
votes
0
answers
12
views
Package survival: testing survival differences at a certain time point using survdiff
I would like to test survival differences for a time point 5 years, while my dataset has a longer follow-up with some events occurring after this time point. I use survdiff to perform the log-rank ...
0
votes
0
answers
17
views
'Not a matrix' error in ate() function in the 'riskRegression' package [closed]
I'm attempting to estimate the average treatment effect of a baseline treatment on a survival outcome by fitting a doubly robust estimator using the ate() function in the package riskRegression. ...
0
votes
0
answers
13
views
How to Conduct Survival Analysis (i.e., determine hazard ratios, expected years life-lost etc) between an observed cohort and source population? [closed]
I am trying to conduct survival analysis to see if a certain sample lives longer on average than the US population. We assume observation starts at 18 and continues until death or censored at age in ...
1
vote
1
answer
45
views
How to manually calculate survival probabilities using flexsurvspline models [closed]
I fit a parametric survival model using flexsurvspline from flexsurv package, and would like to mannually calculate predicted survival probabilities with new data at given time points. The R code ...
0
votes
1
answer
32
views
NA values when using avg_predictions() from marginaleffects with a flexsurv model
I'm unsure why I do not get standard errors or confidence intervals when I fit parametric survival models and compute the predicted mean survival times using the avg_predictions(). I tried using ...
0
votes
1
answer
63
views
ggsurvplot not displaying combined survival curve with add.all = TRUE when Faceting
I am trying to create survival plots using the survminer package in R with data split by genetic mutations and include a summary line representing all individuals across facets. The survival analysis ...
0
votes
0
answers
42
views
How to fit a time-varying cox model to my survival data with categorical variables using CoxTimeVaryingFitter from lifelines library in python
I am trying to fit a time-varying cox model to my survival data using CoxTimeVaryingFitter from lifelines library in python. I have a categorical variable with 5 levels, and I am removing one of the ...
0
votes
0
answers
12
views
Time-varying coefficients based on binary variables
I am doing a survival analysis, and for each individual i have one event occuring (the one of interest), then i have baseline events (inc1 & inc2), so no problem for those ones. But then i have ...
0
votes
1
answer
49
views
Fitting of nls model in R - manual versus brute force issues
I am trying to fit several models to the same data, in this example it's a double exponential approach. I have tried to eyeball the parameters, as well as use a brute force approach (see below.
In ...
3
votes
0
answers
89
views
How can I specify and visualize an interaction in a rms cph model without the main effects included, i.e. with column?
I have a time-to-event model (cph or coxph) with an interaction of a binary and a continuous variable. It works with a *, but it does not work with :. Why is that?
library("survival")
...
0
votes
0
answers
16
views
R survival package: survfit.coxph error when using timeline-style data
I'm running into an error when trying to obtain survival curves from a Cox PH model fitted using timeline-type data with a Surv2 formula.
Error in aeqSurv(Y) : argument is not a Surv object
Here is ...
0
votes
0
answers
24
views
How to get an overlying 1-surv curve on the competing risk outcome graph (Cumulative Incidence) graph
I'm completely new to Survival in R.
I'm performing Competing risk outcome analysis(Cumulative Incidence). I used cmprsk package for this. Now, I would like to overlay the reference category or ...
0
votes
1
answer
50
views
Showing survival probability in % on y-axis for different time-points
I'm using ggsurvfit to create a Kaplan–Meier estimator for survival probability. I know that I can add quantiles for different time points by using e.g. add_quantile(x_value = 5). However, I would ...
-2
votes
1
answer
36
views
Weird Survival curves with confidence intervals in R
My survival graph looks weird at the end of the curves.
I checked my data, it has no negative values for the time-to-event variable. Time-to-event variable has values from 0-3266 days. There are no ...