# NOT RUN {
CoronaVirus_Disease_2019_prevalence(0.0001, 0.9,0.8)
CoronaVirus_Disease_2019_prevalence(0.03,0.9,0.8)
CoronaVirus_Disease_2019_prevalence(0.3,0.9,0.8)
#========================================================================================
# If Sensitivity and Specificity is larger, then, the probability is also larger
#========================================================================================
x <- stats::runif(1111,0,1)
y <- CoronaVirus_Disease_2019_prevalence(0.1,x,x)
dark_theme(4)
plot(x,y)
x <- stats::runif(1111,0,1)
y <- CoronaVirus_Disease_2019_prevalence(0.01,x,x)
dark_theme(4)
plot(x,y)
x <- stats::runif(1111,0,1)
y <- CoronaVirus_Disease_2019_prevalence(0.001,x,x)
dark_theme(4)
plot(x,y)
#========================================================================================
# linear case:
#
# If prevalence is 0.5
# and sensitivity = specificity
# then, the probability is exactly same as sensitivity = specificity
#
#========================================================================================
x <- stats::runif(1111,0,1)
y <- CoronaVirus_Disease_2019_prevalence(0.5,x,x)
dark_theme(4)
plot(x,y)
sum(x==y)==length(x)
# Because the last is true, the probablity is same as sensitivity
# when the prevalence is 0.5.
#========================================================================================
# If the prevalence is larger, then, the probability is also larger
#========================================================================================
x <- stats::runif(1111,0,1)
y <- CoronaVirus_Disease_2019_prevalence(x,0.9,0.9)
dark_theme(4)
plot(x,y)
# }
Run the code above in your browser using DataLab