Learn R Programming

expertsurv (version 1.4.1)

cred_int: Credible interval for pooled distribution

Description

Returns the interval based on defined quantiles. The approach used only provides an approximate (although quite accurate) integral.

Usage

cred_int(plt_obj, val = "linear pool", interval = c(0.025, 0.975))

Value

Credible interval based on the pooled distribution

Arguments

plt_obj

A plot object from plot_expert_opinion.

val

The name of the opinion for which the interval will be generated.

interval

A vector of the upper and lower probabilities. Default is the standard 95% interval

Examples

Run this code
param_expert_example1 <- list()
param_expert_example1[[1]] <- data.frame(dist = c("norm","t"),
    wi = c(0.5,0.5), # Ensure Weights sum to 1
    param1 = c(0.1,0.12),
    param2 = c(0.005,0.005),
    param3 = c(NA,3))
  # \donttest{
plot_opinion1<- plot_expert_opinion(param_expert_example1[[1]], 
              weights = param_expert_example1[[1]]$wi)
cred_int(plot_opinion1,val = "linear pool", interval = c(0.025, 0.975))
# }

Run the code above in your browser using DataLab