Learn R Programming

scmSpillover (version 0.1.1)

plot_all: Generate all plots for SCM analysis

Description

Generate all plots for SCM analysis

Usage

plot_all(
  result,
  start_year = NULL,
  unit_name = "Treated Unit",
  outcome_label = "Outcome",
  treatment_label = "Treatment",
  show_ci = TRUE
)

Value

A list containing three ggplot objects (p1, p2, p3), returned invisibly. Called primarily for side effects (displaying plots).

Arguments

result

Output from run_scm_spillover

start_year

First year of treatment period

unit_name

Name of treated unit (default "Treated Unit")

outcome_label

Label for outcome variable (default "Outcome")

treatment_label

Label for treatment (default "Treatment")

show_ci

Logical, whether to show confidence bands (default TRUE)

Examples

Run this code
if (FALSE) {
  data <- generate_test_data()
  result <- run_scm_spillover(data, treatment_start = 20)
  plots <- plot_all(result)
}

Run the code above in your browser using DataLab