prior_report: Generate a Prior Justification Report

View source: R/prior_report.R

prior_reportR Documentation

Generate a Prior Justification Report

Description

Renders an HTML, PDF, or Word (.docx) report using quarto::quarto_render().

Usage

prior_report(
  prior,
  conflict = NULL,
  sensitivity = NULL,
  robust_prior = NULL,
  sceptical_prior = NULL,
  power_prior = NULL,
  output_format = c("html", "pdf", "docx"),
  output_file = NULL,
  trial_name = "Clinical Trial",
  sponsor = "Sponsor",
  date = as.character(Sys.Date()),
  author = "Biostatistics",
  notes = "",
  prior_plot = NULL,
  overlay_plot = NULL,
  tornado_plot = NULL,
  heatmap_plot = NULL,
  robust_plot = NULL,
  sceptical_plot = NULL,
  power_plot = NULL,
  open_after = interactive()
)

Arguments

prior

A bayprior object.

conflict

Optional bayprior_conflict from prior_conflict().

sensitivity

Optional bayprior_sensitivity from sensitivity_grid().

robust_prior

Optional output of robust_prior().

sceptical_prior

Optional output of sceptical_prior().

power_prior

Optional output of calibrate_power_prior().

output_format

"html" (default), "pdf", or "docx".

output_file

Output path without extension.

trial_name

Trial / protocol identifier.

sponsor

Sponsor name.

date

Report date string. Default Sys.Date().

author

Responsible statistician.

notes

Optional narrative text.

prior_plot

Optional pre-captured ggplot from plot(prior).

overlay_plot

Optional pre-captured ggplot from plot_prior_likelihood().

tornado_plot

Optional pre-captured ggplot from plot_tornado().

heatmap_plot

Optional pre-captured ggplot from plot_sensitivity().

robust_plot

Optional pre-captured ggplot of the robust prior.

sceptical_plot

Optional pre-captured ggplot of the sceptical prior.

power_plot

Optional pre-captured ggplot of the power prior.

open_after

Open after rendering. Default TRUE interactively.

Value

Path to the rendered report, invisibly.


bayprior documentation built on Aug. 27, 2026, 1:09 a.m.