Skip to contents

The Rogan-Gladen estimator, \(p = (p_{obs} + spec - 1) / (sens + spec - 1)\), which recovers a true prevalence from an observed one when the classifier has known sensitivity and specificity. Where group membership is recorded by an administrative identifier rather than by self-identification, sensitivity below 1 means members are recorded as non-members, and every rate computed on the recorded counts is biased. Correction requires an external estimate of sensitivity and specificity, usually from a linkage or validation study.

Usage

morie_misclass_correct(p_obs, sensitivity, specificity, n = NULL, conf = 0.95)

Arguments

p_obs

Observed proportion classified as members.

sensitivity

Probability a true member is classified as a member.

specificity

Probability a true non-member is classified as a non-member.

n

Sample size, used for the confidence interval. Default NULL for no interval. The interval propagates sampling error in p_obs only: sensitivity and specificity are treated as known constants. When they come from a validation study of finite size, their own uncertainty widens the true interval, and this one is optimistic.

conf

Confidence level. Default 0.95.

Value

A list with p_corrected, p_obs, youden (\(sens + spec - 1\)), ratio (corrected over observed) and, when n is supplied, se and ci.

References

Rogan, W. J. and Gladen, B. (1978) Estimating prevalence from the results of a screening test. American Journal of Epidemiology 107(1), 71–76.

Examples

# 4% recorded, identifier misses a quarter of true members
morie_misclass_correct(0.04, sensitivity = 0.75, specificity = 0.999,
                       n = 10000)
#> $p_corrected
#> [1] 0.05206943
#> 
#> $p_obs
#> [1] 0.04
#> 
#> $youden
#> [1] 0.749
#> 
#> $ratio
#> [1] 1.301736
#> 
#> $sensitivity
#> [1] 0.75
#> 
#> $specificity
#> [1] 0.999
#> 
#> $se
#> [1] 0.002616277
#> 
#> $ci
#> [1] 0.04694162 0.05719724
#> 
#> $conf
#> [1] 0.95
#>