Skip to content

Instantly share code, notes, and snippets.

@GarrettMooney
Created March 4, 2018 08:51
Show Gist options
  • Select an option

  • Save GarrettMooney/7316c027272381f256b13c12f849b2a8 to your computer and use it in GitHub Desktop.

Select an option

Save GarrettMooney/7316c027272381f256b13c12f849b2a8 to your computer and use it in GitHub Desktop.
plots of spike and slab prior
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