Description Usage Arguments Details Value Examples
View source: R/CoronaVirus_Disease_2019.R
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.
1 | CoronaVirus_Disease_2019(N, n, se, sp)
|
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 |
————————————————————————–
Diagnosis \ truth | Diseased | Non-diseased |
----------------------- | ----------------------- | ------------- |
Positive | se*n | (N-n)(1-sp) |
Negative | (1-se)*n | (N-n)sp |
----------------------- | ----------------------- | ------------- |
n | N-n | |
————————————————————————-
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 | |
————————————————————————-
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)}.
1 2 3 | CoronaVirus_Disease_2019(10000,10,0.9,0.8)
9/(1998+9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.