# NOT RUN {
# Generate some data
tst <- rnorm(1e5, 3, 1)
plotPost(tst)
plotPost(tst, col='wheat', border='magenta')
plotPost(tst, credMass=0.8, ROPE=c(-1,1), xlab="Response variable")
plotPost(tst, showMode=TRUE, showCurve=TRUE, compVal=5.5)
# For integers:
tst <- rpois(1e5, 12)
plotPost(tst)
# A severely bimodal distribution:
tst2 <- c(rnorm(1e5), rnorm(5e4, 7))
plotPost(tst2) # A valid 95% CrI, but not HDI
plotPost(tst2, showCurve=TRUE) # Correct 95% HDI
# }
Run the code above in your browser using DataLab