-par(mfrow = c(2, 1), mar = c(2, 2, 1, 1))
-
-plot(Rpost$supp, Rpost$pmf, col = "black", type = "l", xlab = "", ylab = "")
-abline(h = 1 / (20 / 0.01 + 1), col = "red")
-abline(v = res1$Rhat, col = "blue")
-abline(v = Rpost$supp[loc], col = "purple")
-legend("topright",
- legend = c("Prior", "Posterior", "Posterior mean", "Posterior mode"),
- col = c("red", "black", "blue", "purple"), lty = 1)