.get_plot_df2 {bsynth}R Documentation

Prepare Data Frame for Plotting with Multiple Treated Units

Description

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.

Usage

.get_plot_df2(y_synth_draws, data, treated_ids, id, time, outcome, ci = 0.75)

Arguments

y_synth_draws

A data frame containing synthetic outcome draws for each treated unit and time period.

data

A data frame with the original data, including outcomes for treated units.

treated_ids

A vector of identifiers for the treated units.

id

The name of the variable in data that identifies units (as a string).

time

The name of the time period variable (as a string).

outcome

The name of the outcome variable (as a string).

ci

The width of the credible confidence interval (default: 0.75).

Value

A data frame containing:


[Package bsynth version 1.0 Index]