# betaExpert: Calculate the parameters of a Beta distribution based on... In prevalence: Tools for Prevalence Assessment Studies

## Description

The `betaExpert` function fits a (standard) Beta distribution to expert opinion. The expert provides information on a best-guess estimate (mode or mean), and an uncertainty range:

• The parameter value is with `100*p%` certainty greater than `lower`

• The parameter value is with `100*p%` certainty smaller than `upper`

• The parameter value lies with `100*p%` in between `lower` and `upper`

## Usage

 ```1 2 3 4 5 6``` ```betaExpert(best, lower, upper, p = 0.95, method = "mode") ## S3 method for class 'betaExpert' print(x, conf.level = .95, ...) ## S3 method for class 'betaExpert' plot(x, y, ...) ```

## Arguments

 `best` Best-guess estimate; see argument `method` `lower` Lower uncertainty limit `upper` Upper uncertainty limit `p` Expert's certainty level `method` Does best-guess estimate correspond to the `mode` or to the `mean`? Defaults to `mode` `x` Object of class `betaExpert` `y` Currently not implemented `conf.level` Confidence level used in printing quantiles of resulting Beta distribution `...` Other arguments to pass to function `print` and `plot`

## Details

The methodology behind the `betaExpert` function is presented by Branscum et al. (2005) and implemented in the BetaBuster software, written by Chun-Lung Su.

The parameters of a standard Beta distribution are calculated based on a best-guess estimate and a 100(p)% uncertainty range, defined by a lower and/or upper limit. The `betaExpert` function uses minimization (`optimize`) to derive α and β from this best guess and lower and/or upper limit. The resulting distribution is a standard 2-parameter Beta distribution: Beta(α, β).

## Value

A list of class `"betaExpert"`:

 `alpha ` Parameter α (shape1) of the Beta distribution `beta ` Parameter β (shape2) of the Beta distribution

The `print` method for `"betaExpert"` additionally calculates the mean, median, mode, variance and range of the corresponding Beta distribution.

## Author(s)

Brecht Devleesschauwer <[email protected]>

## References

Branscum AJ, Gardner IA, Johnson WO (2005) Estimation of diagnostic-test sensitivity and specificity through Bayesian modeling. Prev Vet Med 68:145-163.

## See Also

Package rriskDistributions, which provides a collection of functions for fitting distributions to given data or by known quantiles.

`betaPERT`, for modelling a generalized Beta distribution based on expert opinion

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15``` ```## Most likely value (mode) is 90% ## Expert states with 95% certainty that true value is larger than 70% betaExpert(best = 0.90, lower = 0.70, p = 0.95) ## Most likely value (mode) is 0% ## Expert states with 95% certainty that true value is smaller than 40% betaExpert(best = 0, upper = 0.40, p = 0.95) ## Most likely value (mode) is 80% ## Expert states with 90% certainty that true value lies in between 40% and 90% betaExpert(best = 0.80, lower = 0.40, upper = 0.90, p = 0.90) ## Mean value is assumed to be 80% ## Expert states with 90% certainty that true value lies in between 40% and 90% betaExpert(best = 0.80, lower = 0.40, upper = 0.90, p = 0.90, method = "mean") ```

### Example output

```Loading required package: rjags
Loading required package: coda
Linked to JAGS 4.2.0
Loaded modules: basemod,bugs
alpha     beta      mean    median mode         var      2.5%     97.5%
1 15.03422 2.559357 0.8545289 0.8680246  0.9 0.006685605 0.6616688 0.9726358
alpha    beta      mean    median mode        var        2.5%     97.5%
1     1 5.86449 0.1456772 0.1114763    0 0.01582498 0.004307831 0.4668858
alpha     beta      mean    median mode        var    2.5%     97.5%
1 4.687172 1.921793 0.7092142 0.7312616  0.8 0.02710348 0.34346 0.9582899
alpha     beta mean    median mode        var      2.5%    97.5%
1 2.774428 0.693607  0.8 0.8584878    1 0.03580992 0.3208369 0.998377
```

prevalence documentation built on May 29, 2017, 11:59 a.m.