Learn R Programming

BayesianFROC (version 1.0.0)

CoronaVirus_Disease_2019: Who should be inspected?

Description

Even if a diagnosis test with respect to "all" said that it is positive, however the result cannot be correct in high probability. If we test no suspicous people, then it reduce our resource of diagnosis test and when some suspicous people needs the test, we cannot do the test.

So, the diagnosis test should be done for the suspicous people only. Not should be done for all people including no suspicous people. The medical resource is finite, we should use it for more optimal way.

Usage

CoronaVirus_Disease_2019(N, n, se, sp)

Arguments

N

The number of population, including diseased and non-diseased people

n

The number of diseased population

se

Sensitivity of a diagnostic test

sp

Specificity of a diagnostic test

Value

Probability which is between 0 and 1. I you want to get percent, then it is 100 times the return value.

$$Prob(Truth = diseased | Diagnosis = Positive) = \frac{Se\times n}{Se \times n + (N-n)\times(1-sp)} $$

where we denotes the conditional probability measure of an event \(A\) given the assumed occurrence of \(G\) as an usual manner

$$P(A|G):= \frac{P(A \cap G)}{P(G)}. $$

Details

--------------------------------------------------------------------------

Diagnosis \ truth

Diseased Non-diseased -----------------------
----------------------- ------------- Positive se*n
\((N-n)(1-sp)\) Negative (1-se)*n \((N-n)sp\)
----------------------- ----------------------- -------------
n \(N-n\)

Diagnosis \ truth

Diseased

-------------------------------------------------------------------------

For example,

if prevalence is 0.0001,

population is 10000,

specificity = 0.8,

sensitivity = 0.9,

then the table is the following.

We can calculates the probability of the event that positive-diagnosis correctly detects the diseased patient is

$$ \frac{9}{1998 + 9} = 9/(1998+9) = 0.00448 $$

--------------------------------------------------------------------------

Diagnosis \ truth

Diseased Non-diseased -----------------------
----------------------- ------------- Positive 9
1998 Negative 1 7992
----------------------- ----------------------- -------------
\(n = 10\) \(N-n=10000-10\)

Diagnosis \ truth

Diseased

-------------------------------------------------------------------------

Examples

Run this code
# NOT RUN {
CoronaVirus_Disease_2019(10000,10,0.9,0.8)

9/(1998+9)



# }

Run the code above in your browser using DataLab