Creates a grid of IRF plots with shaded confidence bands using ggplot2
Usage
fplotirf_iv(
point,
upper,
lower,
varnames,
shockname,
prc,
return_data = FALSE,
ribbon_fill = "#407EC9",
ribbon_alpha = 0.3,
line_color = "#910048",
zero_line_color = "#707372",
facet_scales = "free",
facet_ncol = 2
)Arguments
- point
Matrix of point estimates (N x horizon)
- upper
Matrix of upper confidence bounds (N x horizon)
- lower
Matrix of lower confidence bounds (N x horizon)
- varnames
Character vector of variable names (length N)
- shockname
Character string for shock name
- prc
Numeric, confidence level percentage (e.g., 68 or 95)
- return_data
Logical, if TRUE returns tibble instead of plot
- ribbon_fill
Color for confidence band fill (default: "#0072B2")
- ribbon_alpha
Transparency for confidence band (default: 0.3)
- line_color
Color for point estimate line (default: "black")
- zero_line_color
Color for horizontal zero line (default: "red")
- facet_scales
Facet scales option: "free", "free_y", "free_x", or "fixed" (default: "free")
- facet_ncol
Number of columns in facet grid (default: 2)
