plot_expert_opinion: Plotting Pooled Expert Opinion

View source: R/Helper_functions.R

plot_expert_opinionR Documentation

Plotting Pooled Expert Opinion

Description

Returns a ggplot with the individual expert opinions along with the pooled distributions (both linear and logarithmic).

Usage

plot_expert_opinion(
  object,
  xl_plt = NULL,
  xu_plt = NULL,
  weights = NULL,
  St_indic = 0
)

Arguments

object

Either a object of class elicitation (from SHELF) or a dataframe with parameters of the distribution (see Example below).

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.

Value

A ggplot with pooled distributions.

Examples

 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)

                                                        

expertsurv documentation built on Oct. 5, 2023, 5:09 p.m.