findbetamupsi_abstract: The findbetamupsi (abstract) function

View source: R/findbetamupsi_abstract.r

findbetamupsi_abstractR Documentation

The findbetamupsi (abstract) function

Description

A function to estimate (a) the parameters of a Beta distribution for the expected mean of a proportion - usually the prevalence of disease/infection for the units in an area/region and (b) the parameters of a Gamma distribution expressing our prior belief about the variability of the prevalence estimates across the units of the area/region under consideration. General information should be provided about the mean in terms of c("Very low","Low","Average","High","Very high"). The same holds for the variance parameter.

Usage

findbetamupsi_abstract(themean.cat, thevariance.cat,
psi.percentile=0.90, percentile.median, percentile95value,
seed = 280385, nsims = 10000, root.method = "multiroot")

Arguments

themean.cat

specify your prior belief about the mean. It takes a value among c("Very low","Low","Average","High","Very high").

thevariance.cat

specify your prior belief about the variance. It takes a value among c("Very low","Low","Average","High","Very high").

psi.percentile

specify the level of confidence that a certain fraction of the units under study has a prevalence less than the percentile.median. It takes a value between 0 and 1 and the default is 0.90.

percentile.median

specify the median value that corresponds to the defined psi.percentile. It takes a value between 0 and 1 and has to be higher than both themean and the percentile.

percentile95value

specify the value that the percentile.median does not exceed with 95% confidence. It takes a value between 0 and 1 and has to be higher than the percentile.median.

seed

A fixed seed for replication purposes.

nsims

Number of simulations for the creation of various summary metrics of the elicited prior.

root.method

Choose between two alternatives to solve the two non-linear equations to identify the hyperparameters of psi. root.method="multiroot" involves the basic function of the rootSolve package, root.method="nleqslv" involves the base functions of the nleqslv package.

Value

param_beta: The beta distribution parameters Beta(a,b)

param_gamma: The gamma distribution parameters gamma(a,b)

summary: A basic summary of the elicited prior

input: The initial input value that produced the above prior.

param_upper: simulated mu and psi of Beta(mu psi,psi(1-mu))

References

Branscum, A. J., Gardner, I. A., & Johnson, W. O. (2005): Estimation of diagnostic test sensitivity and specificity through Bayesian modeling. Preventive veterinary medicine, 68, 145–163.

Examples

## Example
## The mean prevalence of a disease/infection for the units within an area/region
## is thought to be generally low and its variance is neither high nor low,
## we are also confident that 90% of all units have a prevalence
## less or equal to 0.60 and we are 95% certain that it does not exceed 0.70

findbetamupsi_abstract(
  themean.cat = "Low", thevariance.cat = "Average",
  psi.percentile = 0.90, percentile.median = 0.60, percentile95value = 0.70
)
findbetamupsi_abstract(
  themean.cat = "Low", thevariance.cat = "Average",
  psi.percentile = 0.90, percentile.median = 0.60, percentile95value = 0.70,
  root.method = "nleqslv"
)


PriorGen documentation built on April 3, 2023, 5:15 p.m.