Overview of survminer functions
masterThe survminer package is organized into several functional categories for survival analysis:
Survival Curves
ggsurvplot(): Draws survival curves with 'number at risk', cumulative events, and cumulative censored tables.arrange_ggsurvplots(): Arranges multipleggsurvplotson a single page.ggsurvevents(): Plots event time distributions.ggsurvparametric(): Overlays parametric survival fits (fromsurvregorflexsurv) on Kaplan-Meier curves.surv_summary(): Creates a data frame summary fromsurvfitresults.surv_cutpoint(): Determines optimal cutpoints for continuous variables based on survival significance.surv_median_followup(): Computes median follow-up time using the reverse Kaplan-Meier method.pairwise_survdiff(): Performs multiple pairwise comparisons of survival curves with corrections for multiple testing.weighted_logrank(): Performs weighted (Fleming-Harrington) log-rank tests.
Modern Effect Measures
ggrmst()/ggrmst_difference(): Restricted Mean Survival Time (RMST) visualization with area shading and difference annotation.gglandmark(): Landmark analysis to avoid immortal-time bias.ggmilestone(): Milestone survival at specific timepoints.
Diagnostics of Cox Model
ggcoxzph(): Graphical test of proportional hazards (wrapper forplot.cox.zph()).ggcoxdiagnostics(): Displays goodness-of-fit graphs for Cox Proportional Hazards models.ggcoxfunctional(): Plots continuous explanatory variables against martingale residuals to help choose functional forms.ggcoxnph(): Non-proportional-hazards diagnostic panel.
Summary of Cox Model
ggforest(): Draws forest plots for CoxPH models.ggforest_models(): Compares covariate hazard ratios across multiple Cox models.ggforest_subgroup(): Subgroup forest plots showing treatment hazard ratios and interaction p-values.ggadjustedcurves(): Plots adjusted survival curves forcoxphmodels.
Competing Risks
ggcompetingrisks(): Plots cumulative incidence curves.
Clinical Trial Data
surv_adtte(): Prepares CDISC ADaM time-to-event (ADTTE) datasets.