## '`r params$method`' Uncertainty Quantification (`r params$start`-`r params$end`)

<!-- Uncertainty Quantification Plot -->
```{r, echo = FALSE, out.width = "80%", fig.align = "center", dpi = 150}
knit_plot(params, glue("uncertainty_{params$start}_{params$end}.png"))
```

<!-- Confidence Interval Table -->
```{r, echo = FALSE, results = 'asis'}
outputs <- character()

if ("ci" %in% names(params)) {

	df <- data.frame(
		`Return Period` = params$ci$periods,
		`CI (Lower)` = round(params$ci$lower, 2),
		`Return Level Estimate` = round(params$ci$estimates, 2),
		`CI (Upper)` = round(params$ci$upper, 2),
		check.names = FALSE
	)

	print(knitr::kable(df, format = "markdown", align = "cccc"))

} else {

	for (i in seq_along(params$ci_list)) {

		ci <- params$ci_list[[i]]
		slice <- names(params$ci_list)[[i]]
		cat(glue("\n\n**Slice**: {slice}"))

		df <- data.frame(
			`Effective Return Period` = ci$periods,
			`CI (Lower)` = round(ci$lower, 2),
			`Return Level Estimate` = round(ci$estimates, 2),
			`CI (Upper)` = round(ci$upper, 2),
			check.names = FALSE
		)

		print(knitr::kable(df, format = "markdown", align = "cccc"))

	}

}
```

