Questions tagged [survminer]

Questions related to survminer package

An R package that draws survival curves using 'ggplot2'. See more details at survminer documentation.

95 questions
1
vote
0 answers

How to get per facet p-value in ggsurvplot_facet function

I have a simple question: in using survminer::ggsurvplot_facet function, how can I get the p-value calculcated per each facet? It's displayed on the plot, but I just want to save it for other analysis. Thanks. sfit <- survfit(Surv(time, status) ~…
Mavershang
  • 1,266
  • 2
  • 15
  • 27
1
vote
1 answer

Plot pairwise_survdiff result table together with combined ggsurvplots

I am ploting two survival curves in combination using ggsurvplot_combine: one for the overall survival and another one for survival by a specific variable. I would like to also show the p-values for the survival comparison of each combination in the…
1
vote
0 answers

instalation problem for 'survminer' package in R

I can not install the 'survminer' package in R. I tried many options already described in the stackoverflow, such as: library(devtools) install_github('kassambara/survminer')
user18454320
1
vote
2 answers

How to generate covariate-adjusted cox survival/hazard functions?

I'm using the survminer package to try to generate survival and hazard function graphs for a longitudinal student-level dataset that has 5 subgroups of interest. I've had success creating a model that shows the survival functions without adjusting…
1
vote
1 answer

How to replace the default `geom_ribbon` with `geom_errorbar` in `ggcompetingrisks` from `survminer` package?

How to replace the default geom_ribbon with geom_errorbar in ggcompetingrisks from survminer package? conf.int = T will put confidence interval as a ribbon layer. my code: library(cmprsk);library(survminer) set.seed(2) ss <- rexp(100) gg <-…
Mohamed Rahouma
  • 1,084
  • 9
  • 20
1
vote
1 answer

Why does the surv_pvalue (or any other) function not work inside a custom function in R?

To generate p-values for the differences between two survival curves, I need to perform a tedious series of steps, which need to be repeated with all combinations of two out of three values that are represented in one column of the starting data…
Thomas
  • 77
  • 6
1
vote
1 answer

ggforest in R x tick mark font size

I am trying to change the font size of the x axis tick to larger size and bold, but its not working in ggforest using ggpar. see ate attached image where I have circled the portion I need to change. Is there another way to modify the figure using…
1
vote
1 answer

Displaying greater than sign in ggsurvplot (unicode errrors)

I am attempting to display a greater than sign in my strata labels for a ggsurvplot object. I generated something similar in a different plot (image below): Functioning Code from Image Above kmcurve_spd <- ggsurvplot(km_fitp1_spd, …
Adam
  • 433
  • 2
  • 16
1
vote
1 answer

How to estimate the median survival with upper and lower confidence limits for the median at 90% confidence levels?

My goal is estimate the median survival with upper and lower confidence limits for the median at 90% confidence levels, using a survfit object. churn_dat…
Henrich
  • 11
  • 3
1
vote
1 answer

ggsurvplot and ggplot lattice ?! Plotting kaplan-meier curve with cumulative incidence function

I would like to plot a kaplan meier curve (KM) and cumulative events or cumulative incidence function (CIF) in one plot as a lattice. I have switched recently from SAS to R, and in SAS you can do it all in one step using a macro (See this image),…
ebay
  • 109
  • 1
  • 7
1
vote
1 answer

Survival Analysis in Python - Is there any survminer equivalent in Python?

I am a Data Scientist who is an avid R user and currently exploring Python if it helps to broaden my analytics reach. As a first step, I am trying to replicate my current R analyses using Python. Having worked in oncology, I frequently perform…
Navdeep_DS
  • 85
  • 7
1
vote
1 answer

How do you flip the coordinates in ggsurvplot?

I am trying to flip x and y for my survival analysis plot (using the survival/survminer package), but when I add coord_flip() to this line of code: ggsurvplot(poop_fit, data = egg.data, pval = TRUE, conf.int = TRUE, coord_flip()) I get this…
bibigeans
  • 115
  • 5
1
vote
1 answer

Compact Letter Display from a matrix of significancies or by hand

I am running a multiple pairwise comparison in R. I'm using the survival package survminer. I'm using the function: pairwise_survdiff {survminer} It gives the pairwise comparisons with significance as expected, but doesn't seem to have a way to give…
Colin ISU
  • 13
  • 2
1
vote
0 answers

ggforest() keeps giving "Error in `[.data.frame`(data, , var) : undefined columns selected"

So I've been trying to visualize my Cox model results in a forest plot, but keep getting the error Error in [.data.frame(data, , var) : undefined columns selected. This seems somehow odd to me. Defining the model and giving the summary it was…
1
vote
0 answers

Fitting a survival curve with survfit()

I have a survival data, df, as shown below: df <- structure(list(time_to_event = c(369L, 4597L, 2154L, 4426L, 823L, 4248L, 1045L, 4186L, 1305L, 1960L, 3905L, 5L, 3840L, 3802L, 3730L, 280L, 3678L, 81L, 59L, 3360L, 3318L, 3142L, 2912L, 2909L, 2873L,…
HNSKD
  • 1,614
  • 2
  • 14
  • 25