R/plot_eib_cri.R

Defines functions plot_eib_cri

Documented in plot_eib_cri

#' Plot Credible Intervals
#' 
#' Bayesian posterior credible intervals against willingness to pay.
#' @template args-he
#' @param params Graph parameters
#' @importFrom graphics matlines
#' @keywords internal
#' 
plot_eib_cri <- function(he, params) {
  
  if (!params$plot.cri) return()
  
  ##TODO: move y rearranging to compute_eib_cri()
  ##TODO: single do.call() on combined y matrix
  do.call(matlines,
          list(x = he$k,
               y = matrix(params$data$low,
                          ncol = he$n_comparisons),
               col = params$col,
               lty = params$lty))
  
  do.call(matlines,
          list(x = he$k,
               y = matrix(params$data$upp,
                          ncol = he$n_comparisons),
               col = params$col,
               lty = params$lty))
}

Try the BCEA package in your browser

Any scripts or data that you put into this service are public.

BCEA documentation built on Nov. 25, 2023, 5:08 p.m.