# NOT RUN {
### Half-Normal Distribution
p1 <- prior("norm", c(mean=0, sd=.3), lower = 0)
p1
p1(c(-1,1,3))
plot(p1, -.1, 1)
### Half-Cauchy Distribution
p2 <- prior("t", c(location = 0, scale = .3, nu = 1), lower = 0)
plot(p2, -.5, 3)
### Custom Prior Distribution
p3 <- prior("custom", function(x) x^2, 0, 1)
plot(p3, -.1, 1.2)
# }
Run the code above in your browser using DataLab