Plot censoring over time

plot_censoring_over_time(df)

Arguments

df

A data.frame with one row per clone per observation period that contains weights for each patient-period as returned by create_clones()

Value

a ggplot2 object

Examples


# Load the toy dataset
data(toy_df)

# Create clones
clones <- create_clones(toy_df, 
                        id = "id", 
                        event = "death", 
                        time_to_event = "fup_obs", 
                        exposure = "surgery", 
                        time_to_exposure = "timetosurgery", 
                        ced_window = 365.25/2)

plot_censoring_over_time(clones)