# NOT RUN {
# Generate some data
tst <- rnorm(1e5, 3, 1)
plotPost(tst)
plotPost(tst, credMass=0.8, ROPE=c(-1,1), xlab="Response variable")
plotPost(tst, showMode=TRUE, showCurve=TRUE, compVal=5.5)
# Custom colors
plotPost(tst, mainColor='wheat', border='magenta')
plotPost(tst, credMass=0.8, compVal=0, ROPE=c(-1,1), xlab="Response variable",
comparisonColor="#880088", ROPEColor = "darkblue")
plotPost(tst, showMode=TRUE, showCurve=TRUE, compVal=5.5,
mainColor=2, comparisonColor=4)
# 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