Last active
January 14, 2020 21:57
-
-
Save nikosbosse/3be266dac8d3264a6cfed214312b1caa to your computer and use it in GitHub Desktop.
Two Histograms in One Plot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## illustrate prior | |
prior <- rnorm(100000, 0.5, 0.5) | |
## extract posterior from Stan | |
posterior <- extract(my_stanfitobject)$my_parameter | |
## alternatively, create some second vector | |
vector2 <- rnorm(100000, 2, 0.8) | |
plot_two_histograms(prior, vector2, breaks = 100, | |
upper_limit = 6, | |
xlab = "vec1 is blue, vec2 is pink") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment