Survival analysis compares the statistical strength of predictors for events encoded as occuring or censored in concert with a time variable. It can be parametric or non-parametric.
Questions tagged [survival]
445 questions
0
votes
1 answer
Why does survfit (Survival R package) treat each row as a separate individual?
Using the survival package in R, we can use the "heart" dataset:
survfit(Surv(stop, event) ~ transplant, data = heart)
This outputs a model has n=172 (103 in the transplant=1 group; and 69 in the transplant=1 group) and 75 events (30 in treatment=0;…

user1505631
- 527
- 4
- 13
0
votes
1 answer
Lifelines - CoxTimeVaryingFitter - 'numpy.float64' object has no attribute 'exp'
I am trying to use the CoxTimeVaryingFitter on my dataset, however there seems to be a type issue in baseline_cumulative_hazard_.
I attempted reducing the individual features to isolate the problem but was not able to fit on the dataset below. Is…

Cameron
- 1
0
votes
0 answers
How to use tbl_uvregression with log-rank survival analysis?
I'm looking at survival analysis of a cohort that has no competing risks and would like to use log-rank comparisons instead of cox proportional hazard models.
I've been able to use tbl_uvregression with the coxph function as below (for simplicity…

DocBrown
- 1
0
votes
0 answers
Line being plotted with in surv_fit when there are no events
I have several cumulative incidence curves showing the incidence of an outcome after an exposure, plotted on the same graph, stratified by age at exposure.
The longest follow-up period is 25 years, but in the oldest group, the follow-up does not…

IsaacAllen
- 1
- 1
0
votes
1 answer
Trying to modify data frame for Kaplan Meier analysis: converting from sum mortality to individual status
I have a large data set taken over 13 years including many plots and a treatment. The response variable being tracked is mortality and the data is currently in a summed format. To run Kaplan-Meier or other survival analyses, I need the data in the…

chaparral
- 3
- 2
0
votes
1 answer
How to Install mlr3extralearners in R?
So I am going to do some survivalsvm process and I need the mlr3extralearners package from GitHub. When I tried to install it locally using the tar.gz file, it said
Execution halted
Warning in install.packages: installation of package had non-zero…
user20154235
0
votes
0 answers
Error with a manual function about surbìvival model probability
I need to fit a parametric model(s) to the PFS curve in the present dataset (E.g. exponential/Weibull distribution)
dput(head(data2, 10))
structure(list(Time = c(0, 2.99065, 5.98131, 8.97196, 11.9626,
14.9533, 17.9439, 20.9346, 23.9252, 26.9159),…

12666727b9
- 1,133
- 1
- 8
- 22
0
votes
0 answers
Problem with the AIC from surival model with exclusively created survfit() function
Why is not possible to extract the AIC from this model:
surv_object <- Surv(time = data$`Last observation (days)`, event = data$Death)
surv_object
fit1 <- survfit(surv_object ~ Treatment, data = data)
summary(fit1)
AIC(fit1)
Error in…

12666727b9
- 1,133
- 1
- 8
- 22
0
votes
1 answer
Formatting repeated date data in time dependent survival format
referencing the following manual for time dependent survival in R:
https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf
From the vignette example:
subject time1 time2 death creatinine
5 0 90 0 0.9
5 90 …

Mark
- 639
- 1
- 6
- 15
0
votes
0 answers
ggsurvplot+facet_grid graph_not starting form 100%(or 1) at the x=0
I am doing survival analysis using survival and survminer package.
When I draw a single variable survival graph, I can see it starts form 1 at the baseline.
However, when I am tring to draw facet_grid graph,
I find that the survival graph from same…

Moon
- 21
- 4
0
votes
1 answer
What is the x axis of the predict_survival_function() in Scikit Survival library
According to the docs
https://scikit-survival.readthedocs.io/en/stable/api/generated/sksurv.linear_model.CoxPHSurvivalAnalysis.html#sksurv.linear_model.CoxPHSurvivalAnalysis.predict_survival_function
it returns an array of probabilities of the…

waithira
- 310
- 1
- 2
- 12
0
votes
1 answer
Match ggsurvplot legend text color to line color, include risk table
Related to this previous post about changing the color of the figure legend text to match graphing colors in ggplot, I would like to extend this to ggsurvplot objects.
fit <- survfit(Surv(time, status) ~ sex, data = lung)
fitgraph <- ggsurvplot(fit,…

Timmo83
- 119
- 5
0
votes
1 answer
Survminer - include subset of variables in plot
Let's say I want to plot the survival curves using a model of the lung data, that controls for sex and a median split of the age variable (I could also control linearly for age and that would make my problem even worse).
I would like to make a plot…

Simon
- 25
- 4
0
votes
2 answers
How to get for an intercept only cox ph model in R and what does that mean in the survival package?
How does one set the arguments to make it intercept only in survival package or otherwise and what does intercept only really mean with regards to a cox proportion hazards model.

N B
- 1
- 1
0
votes
1 answer
Show Cancer Specific Survival at exact time (Kaplan Meier in Lifelines)
kmf.survival_function_ (LifeLines Package)
shows me Cancer Specific Survival (CSS) of my cohort at different times (0, 4, 6...128 month). How can CSS be shown at exactly 120 month?

Mischa
- 83
- 1
- 10