Mainly used in function ic
. Produces quantiles of the
posterior gamma distribution. Called twice in ic
to create
credibility intervals.
ci_for_ic(obs, exp, conf_lvl_probs, shrinkage)
The credibility interval specified by input parameters.
A numeric vector with observed counts, i.e. number of reports for the selected drug-event-combination. Note that shrinkage (e.g. +0.5) is added inside the function and should not be included here.
A numeric vector with expected counts, i.e. number of reports to be expected given a comparator or background. Note that shrinkage (e.g. +0.5) is added inside the function and should not be included here.
The probabilities of the posterior, based on
a passed confidence level (conf_lvl
) in ic
. For
instance, if sgn_lvl = .95
in ic
is used, quantiles will be
extracted at sgn_lvl_probs
0.025 and 0.975.
A non-negative numeric value, to be added to observed and expected count. Default is 0.5.
ic