MedDiagn: Computes the posterior probability of having a certain...

Description Usage Arguments Value Author(s) References Examples

View source: R/MedDiagn.R

Description

If experimental data on the sensitivity and the specificity of a diagnostic test are available, and the prevalence of the the condition is known with its raw data, then this function estimates the posterior probability of having the condition, with its 95% credible interval.

Usage

1
2
MedDiagn(x0, n0, x1, n1, x2, n2, N = 10000,
  alpha = 0.05, pdf = FALSE)

Arguments

x0

prevalence raw data: number of people with a certain condition

n0

number of people examined for that condition

x1

sensitivity data: number of people with the disease for whom this test was positive

n1

total number of people in the sensitivity sample

x2

specificity raw data: number of people who did not have the disease who tested negative

n2

total number of people in the specificity sample

N

number of cases to be simulated (best left at 10000 or greater

alpha

credibility required (default 95%)

pdf

set this to TRUE only if you want to keep a pdf-file of the posterior probability plot

Value

none returned: a plot and printed information are produced

Author(s)

Robert van Hulst

References

van Hulst, R. 2018. Evaluating Scientific Evidence. ms.

Examples

1
MedDiagn(105, 35000, 72, 80, 640, 800)

evidence documentation built on May 2, 2019, 2:14 p.m.