Skip to content

Instantly share code, notes, and snippets.

View stuvet's full-sized avatar

Stuart Russell stuvet

View GitHub Profile
@stuvet
stuvet / prior_plot
Last active November 15, 2022 20:02
Example Concentration Plot
library(ggplot2)
library(ggtext)
library(dplyr)
.data <- tibble(
prior = rexp(10000, 1),
posterior = rlnorm(10000, 0.25, 0.2)
) |>
tidyr::pivot_longer(cols = everything()) |>
mutate(name = factor(name))