betaPlot | R Documentation |
Quick and nice plot of beta density distribution based on just alpha and beta
betaPlot(
shape1 = 1.5,
shape2 = 5,
lines = NA,
fill = rgb(0, 0.3, 0.8, 0.4),
cumulative = TRUE,
mar = c(2, 3, 3, 3),
keeppar = FALSE,
las = 1,
main = paste("Beta density with\nalpha =", signif(shape1, 3), "and beta =",
signif(shape2, 3)),
ylim = lim0(y),
xlim = 0:1,
ylab = "",
xlab = "",
type = "l",
lty = 1,
col = par("fg"),
...
)
shape1 |
Alpha value as in |
shape2 |
Beta value. DEFAULT: 5 |
lines |
Quantiles at which vertical lines should be plotted. DEFAULT: NA |
fill |
Color passed to |
cumulative |
Should cumulative density distribution be added? DEFAULT: TRUE |
mar |
Margins for plot passed to |
keeppar |
Should margin parameters be kept instead of being restored to previous value? DEFAULT: FALSE |
las |
Label orientation, argument passed to |
main |
main as in |
ylim , xlim |
limit for the y and x axis. DEFAULT: lim0(y), 0:1 |
ylab , xlab |
labels for the axes. DEFAULT: "" |
type , lty , col |
arguments passed to |
... |
further arguments passed to |
This function very quickly plots a beta distribution by just specifying alpha and beta.
None. Used for plotting.
Berry Boessenkool, berry-b@gmx.de, July 2014
betaPlotComp
, normPlot
, dbeta
,
https://cran.r-project.org/package=denstrip,
https://cran.r-project.org/view=Distributions
betaPlot()
betaPlot(2,1)
betaPlot(0.5, 2)
# beta distribution is often used for proportions or probabilities
# overview of parameters
# alpha = number of successes + 1. beta = number of failures + 1
betaPlotComp()
# a bigger: HDI (Highest Density Interval) further to the right (1)
# b bigger: HDI more to the left (0)
# both bigger: narrower HDI, stronger peak
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.