View source: R/Helper_functions.R
plot_expert_opinion | R Documentation |
Returns a ggplot with the individual expert opinions along with the pooled distributions (both linear and logarithmic).
plot_expert_opinion(
object,
xl_plt = NULL,
xu_plt = NULL,
weights = NULL,
St_indic = 0
)
object |
Either a object of class elicitation (from |
xl_plt |
Optionally set the lower bound for the plot |
xu_plt |
Optionally set the upper bound for the plot |
weights |
A vector with the weight of each expert. If omitted, set to equal weights. |
St_indic |
Set to 1 if you want to truncate the distributions to be between 0 and 1. |
A ggplot with pooled distributions.
expert_df <- data.frame(dist = c("norm","t"), #Distribution Name
wi = c(1/3,2/3), #Expert weights
param1 = c(0.3,0.40), #Parameter 1
param2 = c(0.05,0.05),# Parameter 2
param3 = c(NA,3)) #Parameter 3: Only t-distribution
plot_expert_opinion(expert_df , weights = expert_df$wi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.