plot_rd_aa_share.Rd
This function creates a plot for the share of always-assigned units in a Regression Discontinuity (RD) design, either Sharp RD (SRD) or Fuzzy RD (FRD). It provides options to include various confidence intervals and reference lines.
plot_rd_aa_share(
data,
rd_type = "SRD",
x_label = "Share of Always-assigned Units",
y_label = "ATE",
plot_title = "",
theme_use = causalverse::ama_theme(),
tau = TRUE,
tau_CI = FALSE,
bounds_CI = TRUE,
ref_line = 0,
...
)
The output object from the rdbounds
function.
The type of RD design, either "SRD" for Sharp RD or "FRD" for Fuzzy RD. Default is "SRD".
The label for the x-axis. Default is "Share of Always-assigned Units".
The label for the y-axis. Default is "ATE".
The title of the plot. Default is an empty string.
A ggplot2 theme function to apply to the plot. Default is
causalverse::ama_theme()
.
Logical, whether to include a vertical line at the estimated treatment effect. Default is TRUE.
Logical, whether to include confidence intervals for the treatment effect estimate. Default is FALSE.
Logical, whether to include confidence intervals for the manipulation bounds. Default is TRUE.
The y-intercept for a reference line. Default is 0.
Additional arguments passed to labs
in ggplot2.
A ggplot object.
if (FALSE) {
set.seed(1)
data <- rdbounds::rdbounds_sampledata(10000, covs = FALSE)
rdbounds_est_tau <- rdbounds::rdbounds(
y = data$y,
x = data$x,
treatment = data$treatment,
c = 0,
discrete_x = FALSE,
discrete_y = FALSE,
bwsx = c(.2, .5),
bwy = 1,
kernel = "epanechnikov",
orders = 1,
evaluation_ys = seq(from = 0, to = 15, by = 1),
refinement_A = TRUE,
refinement_B = TRUE,
right_effects = TRUE,
potential_taus = c(.025, .05, .1, .2),
yextremes = c(0, 15),
num_bootstraps = 5
)
plot_rd_aa_share(rdbounds_est_tau)
}