Questions tagged [survival]

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.

445 questions
0
votes
1 answer

Regarding tau_max in Survival Probability calculation using MDAnalysis python package

I am newbie in using MDAnalysis as well as python in general. I have performed a 100 ns simulation on a protein and wanted to calculate the survival probability of my water molecules within my selection. The thing is using the given code of…
0
votes
0 answers

XGBoost Survival Model

I'm trying to develop an XGBoost Survival model. Here is a quick snap of my code: X = df_High_School[['Gender', 'Lived_both_Parents', 'Moth_Born_in_Canada', 'Father_Born_in_Canada','Born_in_Canada','Aboriginal','Visible_Minority']] # covariates y…
0
votes
1 answer

How does the survival package for R handle deaths that occur at t0 when computing a log-rank test for equality of survival functions?

I read that in Stata, there is an issue where observations can end at t0 and therefore be omitted from the analysis inadvertently. The workaround is to add some small e > 0 to each death at t0 to prevent this. See this link for the description of…
jp5602
  • 41
  • 5
0
votes
0 answers

adding theme_survminer removes grid lines from ggsurvplot object

I added a theme_survminer to my ggsurvplot object in order to control the font size. However when doing so the grid lines that were present in the ggsurvplot object are removed. Is there a way to control the font (axes, lengend) from within…
Omry Atia
  • 2,411
  • 2
  • 14
  • 27
0
votes
0 answers

Error in `annotate()`: ! Can't find geom called "table" Traceback:

I am trying to include table in the survival plot. but I get an error as Error in `annotate()`: ! Can't find geom called "table" Traceback: 1. annotate(geom = "table", x = 140, y = 0.9, label = list(as.data.frame(table))) 2. layer(geom = geom,…
user2110417
0
votes
1 answer

ggsave ggsurvplot with risk.table

I am trying to save a ggsurvplot with risk.table using ggsave. However, the output off ggsave is always just the risk.table. I also tried this and this. None is working. library(data.table) library(survival) library(survminer) OS <- c(c(1:100),…
gernophil
  • 177
  • 2
  • 6
0
votes
0 answers

Missing value where TRUE/FALSE needed error in smcure model

I'm creating a cure model in R to predict Loan Default. I'm seeking someone to help me debug this error. I think it may have to do with my columns. library(smcure) smcure(Surv(DURATION, DEFAULT) ~…
Antonio
  • 417
  • 2
  • 8
0
votes
0 answers

How to use cluster argument in joint model in JM package R

I am running a joint model in R using the JM package. I have been receiving an error when I ran this code: *jointFit<- jointModel(lmeFit, coxFit, timeVar="mesure", method='piecewise-PH-aGH")* The errror is: Error in jointFit<- jointModel(lmeFit,…
Chris7
  • 11
  • 1
0
votes
3 answers

Remove dash on strata line when using ggsurvplot and survminer

How do I change the line type for the sex strata so that it is a line without all the small "crosses" as shows in the picture below? I hope to get just a solid line instead. The cross makes things look a little congested when there is a lot of data…
curious
  • 640
  • 4
  • 10
0
votes
1 answer

How do I get gtsummary to exponentiate a weibull model?

I'm running a Weibull regression using the survreg function in the survival package. I'd like to use gtsummary to then produce a table of the results. But when I try to exponentiate the beta coefficient, it just returns me the same beta value - but…
John Ryan
  • 343
  • 1
  • 9
0
votes
0 answers

How to read feature importance for censored data?

event.1 event.2 AMOUNT 0.2455 0.0108 INSTALL_RATE 0.0535 0.0239 FOREIGN 0.0413 0.0640 PROPERTY 0.0390 0.0016 HISTORY 0.0278 0.0279 AGE 0.0169 …
Antonio
  • 417
  • 2
  • 8
0
votes
0 answers

Can Ctree() predict classification?

CondInfTree <- ctree(DEFAULT ~ ., data = train) Using the above code, I get DEFAULT binary predictions which is what I'm seeking. If I use: CondInfTree <- ctree(Surv(DURATION,DEFAULT)~ ., data = train) I…
Antonio
  • 417
  • 2
  • 8
0
votes
0 answers

Is there a way to use survSplit to cut each observation at a different time?

I'm working on the following dataset: https://www.kaggle.com/datasets/pavansubhasht/ibm-hr-analytics-attrition-dataset I'm trying to conduct a survival analysis on this dataset, but with so many measurements that depend on time after the start of…
0
votes
1 answer

Do results of survival analysis only pertain to the observations analyzed?

Hey guys, so I taught myself time-to-event analysis recently and I need some help understanding it. I made some Kaplan-Meier survival curves. Sure, the number of observations within each node is small but let's pretend that I have plenty. K <- HF…
Antonio
  • 417
  • 2
  • 8
0
votes
0 answers

How to use KaplanMeierFitter for predictions

I have a huge dataset with subscriptions (ongoing ones and terminated ones) and I want to use the KaplanMeierFitter to predict for each cohort(=month in which subscription started) how many subscriptions will still be ongoing/active in the next…