All functions

cast_clones_to_long()

Cast one-row-per-clone data to long format

create_clones()

Create clones for CCW analysis

create_clones_check_inputs()

Check inputs to create clones

data_final

Testing data for cast_clones_to_long

data_long

Testing data for generate_ccw_calc_weights, surgery recipients

data_long_2

Testing data for generate_ccw_calc_weights, no surgery recipients

data_long_cox

Testing data for generate_ccw

generate_ccw()

Generate clone censor weights (CCW) on the long data.frame

generate_ccw_calc_weights()

Calculate weights for each arm of a long data.frame

plot_ccw_over_time()

Visualize weights and variables over time

plot_censoring_over_time()

Plot censoring over time

plot_var_mean_over_time()

Plot a variable over time for each clone, weighted and unweighted

tab

Testing data for create_clones

toy_df

Toy dataset from Maringe et al. (2020)

winsorize_ccw_weights()

Winsorize clone censor weights (CCW) on the long data.frame