## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
# Website previews use their own reports; installed vignettes use public URLs.
report_base <- if (identical(Sys.getenv("IN_PKGDOWN"), "true")) {
  "../reports/"
} else {
  "https://yhoriuchi.github.io/eventsurvey/reports/"
}

## ----application-comparison, echo = FALSE-------------------------------------
comparison <- read.csv("figures/application-calibration.csv")
comparison$Interval <- sprintf("[%.3f, %.3f]", comparison$conf_low, comparison$conf_high)
knitr::kable(
  comparison[c("outcome", "effect", "Interval", "n_windows")],
  col.names = c("Outcome", "Average effect", "95% honest CI", "Reference windows"),
  digits = 3,
  row.names = FALSE
)

## ----eval = FALSE-------------------------------------------------------------
# Sys.setenv(EVENTSURVEY_BATESON_DATA = "/path/to/cleaned_main.csv")
# source("data-raw/render-application-reports.R")
# source("data-raw/render-bateson-figures-local.R")

