Learn R Programming

plausibounds (version 1.0.1)

create_plot: Create Plot for Plausible Bounds

Description

This function creates a plot of plausible bounds from a plausible_bounds object. The plot displays plausible bounds as the main visualization, with optional pointwise and sup-t bounds overlays. Supports event study designs with pre-treatment periods.

Usage

create_plot(
  result,
  show_supt = TRUE,
  show_pointwise = TRUE,
  show_annotations = TRUE
)

Value

A ggplot2 object

Arguments

result

A plausible_bounds object returned by the plausible_bounds() function

show_supt

Whether to show sup-t bounds (default: TRUE)

show_pointwise

Whether to show pointwise bounds (default: TRUE)

show_annotations

Whether to show annotations with test statistics and ATE (default: TRUE)

Examples

Run this code

# Example with bighump estimates and correlation between estimates
data(estimates_bighump)
data(var_bighump)
result_complex <- plausible_bounds(estimates_bighump[1:4], var_bighump[1:4, 1:4])
plot_complex <- create_plot(result_complex)

Run the code above in your browser using DataLab