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.
.plot_tau(data, x, y, ymin, ymax, xintercept, facet, id, subset = NULL)A ggplot object displaying the treatment effect plot.
A data frame containing the data to be plotted.
The name of the x-axis variable (typically the time period) (as a string).
The name of the y-axis variable (typically the treatment effect) (as a string).
The name of the variable containing the lower bound of the confidence interval (as a string).
The name of the variable containing the upper bound of the confidence interval (as a string).
The time point of the intervention to be marked with a vertical dashed line.
(Optional) The name of the variable to facet the plot by (as a string).
The name of the variable identifying the units (as a string).
(Optional) A vector specifying a subset of units to include in the plot. If NULL, all units are included.