library(tidyverse)
library(patchwork)
diff_nu <- ggplot(data = tibble(x = c(0, 200)), aes(x = x)) +
geom_area(stat = "function", fun = dexp, args = list(rate = 1/29),
fill = "darkblue", color = "black") +
labs(x = expression(Normality ~ parameter ~ (nu)), y = "Density") +
annotate(geom = "label", x = 100, y = 0.009, label = "Exponential(1/29)") +
theme_minimal() +
theme(panel.grid = element_blank(),
axis.text.x = element_blank())
diff_mu <- ggplot(data = tibble(x = c(0, 100)), aes(x = x)) +
geom_area(stat = "function", fun = dnorm, args = list(mean = 50, sd = 10),
fill = "darkred", color = "black") +
scale_x_continuous(breaks = c(seq(0, 100, 25)),
labels = c("−$50", "−$25", "Group average", "+$25", "+$50")) +
annotate(geom = "label", x = 50, y = 0.01, label = "N(bar(x), 10)", parse = TRUE) +
labs(x = expression(Average ~ donated ~ (mu)), y = NULL) +
theme_minimal() +
theme(panel.grid = element_blank(),
axis.text.x = element_blank())
diff_sigma <- ggplot(data = tibble(x = c(0, 10)), aes(x = x)) +
geom_area(stat = "function", fun = dcauchy, args = list(location = 0, scale = 1),
fill = "darkorange", color = "black") +
scale_x_continuous(labels = scales::dollar) +
annotate(geom = "label", x = 5, y = 0.08, label = "Cauchy(0, 1)") +
labs(x = expression(SD ~ donated ~ (sigma)), y = NULL) +
theme_minimal() +
theme(panel.grid = element_blank(),
axis.text.x = element_blank())
diff_nu + diff_mu + diff_sigma
Created on 2019-02-25 by the reprex package (v0.2.1)