vizdraws | R Documentation |
Visualize Draws from Prior or Posterior Distributions
vizdraws(
prior = NULL,
posterior = NULL,
MME = 0,
threshold = NULL,
units = NULL,
quantity = FALSE,
tense = c("future", "past"),
backgroundColor = "#FFFFFF",
backgroundOpacity = 0.9,
xlab = NULL,
breaks = NULL,
break_names = NULL,
colors = NULL,
width = NULL,
height = NULL,
xlim = NULL,
font_scale = 1,
display_mode_name = FALSE,
title = "",
stop_trans = FALSE,
percentage = FALSE,
elementId = NULL,
logoPath = NULL,
logoSize = 100,
logoLocation = c("bottom-right", "top-left", "top-right", "bottom-left")
)
prior |
(optional) Prior distribution or draws from it. Supported distributions: 'Normal', 'uniform', 'beta', and 'gamma'. Provide either this or the posterior. |
posterior |
(optional) Draws from the posterior distribution. Provide either this or the prior. |
MME |
Minimum meaningful effect. If not provided, MME is set to zero. |
threshold |
If the probability is greater than this threshold, a decision is considered comfortable. |
units |
Optional argument to specify the units of x (e.g., dollars or applications). |
quantity |
Defaults to |
tense |
Either "future" or "past." This is the tense used in the description if quantity is set to TRUE. |
backgroundColor |
Defaults to |
backgroundOpacity |
Defaults to |
xlab |
Defaults to |
breaks |
Defaults to |
break_names |
Defaults to |
colors |
Colors for the left, middle, and right areas. Defaults to c("#e41a1c", "#377eb8", "#4daf4a"). |
width |
Width for shiny. |
height |
Height for shiny. |
xlim |
Defaults to |
font_scale |
Defaults to |
display_mode_name |
Defaults to |
title |
Defaults to |
stop_trans |
Defaults to |
percentage |
Defaults to |
elementId |
Use an explicit element ID for the widget (rather than an automatically generated one). elementID for shiny. |
logoPath |
Logo path. Defaults to |
logoSize |
Logo size. Defaults to |
logoLocation |
Logo location. |
A function to visualize draws from either the prior or posterior distribution, facilitating interpretation and decision-making.
A HTML widget object.
if(interactive()){
set.seed(9782)
library(vizdraws)
vizdraws(prior = rnorm(100000))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.