Created
March 4, 2018 08:51
-
-
Save GarrettMooney/7316c027272381f256b13c12f849b2a8 to your computer and use it in GitHub Desktop.
plots of spike and slab prior
This file contains hidden or 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
| Spike and Slab Prior | |
| ---- | |
| ```{r, message=FALSE} | |
| library(magrittr) | |
| ``` | |
| ```{r} | |
| prior_plot <- function(lower, upper, sigma, ...) { | |
| seq(lower, upper, l=100) %>% plot(., dnorm(., 0, sigma)) | |
| abline(v= 0, lty = 2, col = "red") | |
| } | |
| prior_plot(-3/4, 3/4, 0.1) | |
| prior_plot(-1e8, 1e8, 99999999999999) | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment