
Plot observed and predicted outcomes by cluster over time
Source:R/plot_clusters.R
plot_clusters.RdPlot observed and predicted outcomes by cluster over time
Examples
# Load data
test_data <- load_data(time ="period", cluster_id = "cluster", individual_id = NULL,
treatment = "trt", outcome = "outcome_cont", data = sw_data_example)
# Analyze using TATE estimand for exposure times 1 through 4
results_tate <- analyze(dat = test_data, method = "mixed", estimand_type = "TATE",
estimand_time = c(1, 4), exp_time = "ETI")
# Plot by cluster
plot_clusters(results_tate)