Plot Adjusted Kaplan-Meier Estimates from a Landmark Time

Plots contextual landmark Kaplan-Meier curves. An extension of the 'survminer::ggsurvplot()' function that allows the specification of a landmark time and an optional label. The period before the landmark is displayed as a pooled survival curve, while curves beyond the landmark are presented according to the groups defined in the supplied 'survival::survfit' object.


landmarked

The goal of landmarked is to plot survival curves for time-to-event data adjusted for a specified landmark time. You can use your existing survminer::ggsurvplot code and specify the landmark time and label.

Installation

You can install the landmarked from CRAN with:

install.packages("landmarked")

You can install the development version of landmarked from GitHub with:

# install.packages("pak")
pak::pak("CStats/landmarked")

Example

This is a basic example which shows you how to plot an adjusted landmark curve.

library(landmarked)

fit = survival::survfit(survival::Surv(time, status) ~ sex, data = survival::lung)
ggsurvplotlm(fit, landmark_time = 42, landmark_label = "Landmark Time")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("landmarked")

0.2.0 by Chris Brown, 20 days ago


https://github.com/CStats/landmarked


Browse source code at https://github.com/cran/landmarked


Authors: Chris Brown [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


GPL (>= 3) license


Imports dplyr, ggplot2, survival, survminer

Suggests knitr, rmarkdown, testthat


See at CRAN