.get_plot_df {bsynth}R Documentation

Returns Data Frame Ready for Plotting with Confidence Intervals

Description

This function processes data frames containing synthetic and observed outcomes, calculates confidence intervals for the synthetic outcomes, and returns a combined data frame suitable for plotting the results.

Usage

.get_plot_df(y_synth_draws, pre_data, post_data, time, outcome, ci = 0.75)

Arguments

y_synth_draws

A data frame containing draws from the Stan fit object.

pre_data

A data frame with data before the intervention.

post_data

A data frame with data after the intervention.

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]