This function processes data for multiple treated units, calculating synthetic outcomes, confidence intervals, and treatment effects. It combines this information into a data frame suitable for plotting the results.
.get_plot_df2(y_synth_draws, data, treated_ids, id, time, outcome, ci = 0.75)A data frame containing:
time: The time period.
id: The unit identifier (including "Average" for the average treatment effect).
outcome: The observed outcome (for treated units).
y_synth: The mean synthetic outcome (for treated units and the average).
LB: The lower bound of the confidence interval for the synthetic outcome.
UB: The upper bound of the confidence interval for the synthetic outcome.
tau: The treatment effect (difference between observed and synthetic outcomes).
tau_LB: The lower bound of the confidence interval for the treatment effect.
tau_UB: The upper bound of the confidence interval for the treatment effect.
A data frame containing synthetic outcome draws for each treated unit and time period.
A data frame with the original data, including outcomes for treated units.
A vector of identifiers for the treated units.
The name of the variable in data that identifies units (as a string).
The name of the time period variable (as a string).
The name of the outcome variable (as a string).
The width of the credible confidence interval (default: 0.75).