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

survxai explainer with an mlr3proba model

I am trying to build a survxai explainer from a survival model built with mlr3proba. I'm having trouble creating the predict_function necessary for the explainer. Has anyone ever tried to build something like this? So far, my code is the…
pvidal00
  • 15
  • 5
0
votes
0 answers

Compute a single survival analysis plot from a cox hazard model of high and low expression of multiple genes stratified with sex

I had a set of 25 genes and I wanted to make a single survival analysis plot of cancer data from the TCGA GDC Portal expression data. To define high and low in the expression values, I used a survival analysis pipeline and used z-score assigning…
0
votes
1 answer

survival::tmerge: how to manage events that are actually not not be intended as multiple?

I'm struggling to set a dataframe for multistate survival analysis. Here is the reproducible example with only 3 individuals (ID). This is only a part of the multistate. f <- structure(list(ID = c(3, 4, 5), time_to_end = c(30, 36, 36)), row.names =…
Devanto
  • 33
  • 5
0
votes
0 answers

Univariate Cox analysis for a gene list

I'm trying to plot this: enter image description here using this code form GitHub: PP<- data.frame() for (i in names(tt)) { dd <- tt[[i]] for(j in colnames(dd)[4:ncol(dd)]){ scox <- summary( coxph(Surv(OS.time,OS) ~ get(j),dd)) p…
0
votes
1 answer

Viewing survival:Surv objects using View from RStudio

I ran the below code chunk from a fresh start from within RStudio and get a Error in View : subscript out of bounds error when trying to use View. The issue appears to be with viewing the Surv objects ("censored data" where the exact value is…
greengrass62
  • 968
  • 7
  • 19
0
votes
0 answers

How to understand and explain the level with NA value in coxph interaction model

A minimal example is given as below. Why the last row (the last level of combination) got NA? I thought it should be treated as a reference level, am I right? Which is the reference level in the combination? > library(survival) >…
Shixiang Wang
  • 2,147
  • 2
  • 24
  • 33
0
votes
1 answer

survfit outputs NA upper bounds but median survival is reached

The following data reach the median survival of 50%, but the upper bounds are NA. I am unable to figure out why the upper bounds are NA if I have valid survival histories. .data = structure(list(event_occurred = c(TRUE, FALSE, TRUE, FALSE, TRUE,…
colej1390
  • 157
  • 4
  • 11
0
votes
1 answer

How to use termplot function with fixed predictive variable values?

Let´s assume I want to draw a plot similar to here here using R, i.e. hazard ratio on y axis and some predictor variable on x axis based on a Cox model with spline term. The only exception is that I want to set my own x axis points; termplot seems…
Jacko
  • 51
  • 3
0
votes
1 answer

How to change the y-axis of the censoring table in ggsurvplot in R?

The ggsurvplot function from the package survminer allows users to draw Kaplen-Meier curves. It also allows us to create a table beneath the plot with the number of censored observations by configuring the ncensor.plot value. My question is: how…
Pashtun
  • 123
  • 7
0
votes
1 answer

Is there a way to "horizontally merge" two Kaplan-Meier curves of the same dataset with two consecutive time-to-event variables?

I have a dataset consisting in observations of the developmental time and survival of an insect. Developmental time is the time in days between egg exclosure and adult emergence, while survival of adults is the time between adult emergence and death…
0
votes
1 answer

choosing number of iteration (maxfun) in glmer for a panel data modeling using discrete survival analysis in R

I have a large panel dataset with ~ 2000 individuals and ~ 15000 observations (person/year). I have set of time-varying and non-time varying variables and and binary outcome variable (0/1). I am trying to do a multi-level discrete survival analysis…
rais
  • 81
  • 6
0
votes
1 answer

How to plot the X year survival probability(let's say X=10) from a COX regression model with the change of covariate?

I noticed that most codes provided for survival curve plot are about the trend of survival by time, is there any r package that can set "time" as fixed, e.g 10 years, and plot the 10-year survival probability with the change of covariates, e.g.…
Orieo_077
  • 1
  • 1
0
votes
1 answer

comp() returns ranks instead of p-values

I am given example that comp() should be returning p-vals but it ends up returning ranks so let me ask: Why is comp() function from survmisc package returning ranks instead of p-values? Is there a way to change it? test_drug <-…
rkabuk
  • 267
  • 3
  • 15
0
votes
0 answers

How to add a specific timepoint in ggsurvplot?

I want to break my survival plot and risk table in 7 days, but the follow-up ends at 90 days and I also want to include a tick at 90 days. By default, the plot ends at 84 days when breaking time by 7 days. Adding a custom x axis is not sufficient as…
vincentleroy
  • 35
  • 1
  • 5
0
votes
0 answers

Piecewise time-dependent coefficients for Cox regression in R

In a Cox regression framework, I'd like to implement piecewise continuous time-dependent coefficients. This is for variable that do not satisify the PH assumption. In this vignette…
user3631369
  • 329
  • 1
  • 12