.plot_tau {bsynth} | R Documentation |
Plot Treatment Effect Estimate
Description
This internal helper function creates a plot to visualize the estimated treatment effect over time. It allows for faceting by a specified variable and optional subsetting of units to include in the plot.
Usage
.plot_tau(data, x, y, ymin, ymax, xintercept, facet, id, subset = NULL)
Arguments
data |
A data frame containing the data to be plotted. |
x |
The name of the x-axis variable (typically the time period) (as a string). |
y |
The name of the y-axis variable (typically the treatment effect) (as a string). |
ymin |
The name of the variable containing the lower bound of the confidence interval (as a string). |
ymax |
The name of the variable containing the upper bound of the confidence interval (as a string). |
xintercept |
The time point of the intervention to be marked with a vertical dashed line. |
facet |
(Optional) The name of the variable to facet the plot by (as a string). |
id |
The name of the variable identifying the units (as a string). |
subset |
(Optional) A vector specifying a subset of units to include in the plot. If NULL, all units are included. |
Value
A ggplot object displaying the treatment effect plot.