Learn R Programming

scmSpillover (version 0.1.1)

plot_effects: Plot treatment effects only

Description

Plot treatment effects only

Usage

plot_effects(
  result,
  start_year = NULL,
  unit_name = "Treated Unit",
  outcome_label = "Outcome",
  show_ci = TRUE,
  show_vanilla = FALSE
)

Value

A ggplot object that can be further customized or saved.

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")

show_ci

Logical, whether to show confidence bands (default TRUE)

show_vanilla

Logical, whether to show vanilla SCM comparison (default FALSE)

Examples

Run this code
# \donttest{
  data <- generate_test_data()
  result <- run_scm_spillover(data, treatment_start = 20, verbose = FALSE)
  p <- plot_effects(result)
# }

Run the code above in your browser using DataLab