The test system is assumed to be an EIA tests and then a confirmatory Western Blot (WB) test.Each test is considered conditionally independent.
A. What is the sensitivity of this test system?
Define function to calculate overall sensitivity. It is (sensitivity of EIA\( )^2 \) * (sensitivity of WB), because all three tests have to be positive to be considered overall positive.
overall.sens <- function(sens.eia, sens.wb) sens.eia * sens.wb
Thus, for the given sensitivities, the overall sensitivity P(T+|D+) is:
sens.eia <- 0.98
sens.wb <- 0.92
overall.sens(sens.eia, sens.wb)
## [1] 0.9016
B. What is the specificity of this test system?
Among disease-negative participants, if either one of 1st to 3rd tests is negative, overall success (true negative result) is achieved. For simplicity, the complement, the situation that all three tests are false positive isconsidered. This is then subtracted from 1 to obtain the probability of overall sensitivity.
overall.spec <- function(spec.eia, spec.wb) 1 - (1 - spec.eia) *
(1 - spec.wb)
Thus, for the given specificities, the overall specificity (T-|D-) is:
spec.eia <- 0.998
spec.wb <- 0.95
overall.spec(spec.eia, spec.wb)
## [1] 0.9999
C. What is the probability that a person screening positive in this test system truly has HIV infection, if the person screened is:
1. a female blood donor
options(digits = 4)
p.dis.pos <- 1e-04
p.dis.neg <- 1 - p.dis.pos
f.ppv <- function(p.dis.pos, p.dis.neg) {
true.pos <- p.dis.pos * overall.sens(sens.eia, sens.wb) # among D+
false.pos <- p.dis.neg * (1 - overall.spec(spec.eia, spec.wb)) # among D-
ppv <- true.pos/(true.pos + false.pos)
ppv
}
f.ppv(p.dis.pos, p.dis.neg)
## [1] 0.4742
2. a multiple transfusion recipient
p.dis.pos <- 0.05
p.dis.neg <- 1 - p.dis.pos
f.ppv(p.dis.pos, p.dis.neg)
## [1] 0.9979
3. a male homosexual in San Francisco
options(digits = 5)
p.dis.pos <- 0.62
p.dis.neg <- 1 - p.dis.pos
f.ppv(p.dis.pos, p.dis.neg)
## [1] 0.99993
D. A limitation of both EIA and WB is they are tests for HIV antibody, not HIV itself. In any population, a fraction of HIV-infected persons have not yet seroconverted to HIV antibody. What is the probability that a person in each of the above populations and who screen negative in this test system nonetheless has HIV? Assume that the probability that an HIV-infected person has seroconverted is (1) 98.5% or (2) 97%.
Define two seroconversion proportions.
Then, at two different proportions of seroconversion, calculate the PPV.
p.sero.pos.1 <- 0.985
p.sero.pos.2 <- 0.97
1. a female blood donor
options(digits = 9)
p.dis.pos <- 0.0001
p.dis.neg <- 1 - p.dis.pos
dis.pos.in.test.neg <- function(p.dis.pos, p.dis.neg, p.sero.pos) {
false.neg <- p.dis.pos * p.sero.pos * (1 - overall.sens(sens.eia, sens.wb)) + # sero+D+ and FN
p.dis.pos * (1 - p.sero.pos) * overall.spec(spec.eia, spec.wb) # sero-D+ and TN is FN
true.neg <- p.dis.neg * overall.spec(spec.eia, spec.wb) # TN
result <- false.neg / (true.neg + false.neg)
result
}
result <-
lapply(list(p.sero.pos.1 = p.sero.pos.1, p.sero.pos.2 = p.sero.pos.2),
function(p.sero.pos) dis.pos.in.test.neg(p.dis.pos, p.dis.neg, p.sero.pos)
)
lapply(result,
function(y) {
sprintf("%f9", y)
})
## $p.sero.pos.1
## [1] "0.0000119"
##
## $p.sero.pos.2
## [1] "0.0000139"
##
2. a multiple transfusion recipient
p.dis.pos <- 0.05
p.dis.neg <- 1 - p.dis.pos
sapply(simplify = FALSE, list(p.sero.pos.1 = p.sero.pos.1, p.sero.pos.2 = p.sero.pos.2),
function(p.sero.pos) dis.pos.in.test.neg(p.dis.pos, p.dis.neg, p.sero.pos))
## $p.sero.pos.1
## [1] 0.0058567435
##
## $p.sero.pos.2
## [1] 0.00655971474
##
3. a male homosexual in San Francisco
p.dis.pos <- 0.62
p.dis.neg <- 1 - p.dis.pos
sapply(simplify = FALSE, list(p.sero.pos.1 = p.sero.pos.1, p.sero.pos.2 = p.sero.pos.2),
function(p.sero.pos) dis.pos.in.test.neg(p.dis.pos, p.dis.neg, p.sero.pos))
## $p.sero.pos.1
## [1] 0.154426038
##
## $p.sero.pos.2
## [1] 0.169913612
##