Skip to contents

Formula: under misclassification with sensitivity Se and specificity Sp, the expected observed exposed count in a group of size N whose true exposed count is A is E[A_obs] = Se A + (1 - Sp) (N - A), so the matrix-corrected true count inverts it, A = (A_obs - (1 - Sp) N) / (Se + Sp - 1). This is the "divide by (Se + Sp - 1)" rule written out with its offset term. It is undefined when Se + Sp = 1 and inadmissible when Se + Sp < 1.

Usage

Epbias(A_obs, Se, Sp, N = NULL)

Arguments

A_obs

Observed exposed count in each group.

Se

Sensitivity, scalar or one per group, in (0, 1].

Sp

Specificity, scalar or one per group, in (0, 1].

N

Group totals; if omitted, A_obs must be length 2 and is read as (exposed, unexposed) of a single group.

Value

List with estimate, a_true, a_obs, totals, prevalence, or_obs, or_true, sensitivity, specificity, n, method.

Details

With exactly two groups – cases first, then controls – the corrected and uncorrected odds ratios are both reported.

References

Greenland (1988), Statistics in Medicine 7(7):745-757, doi:10.1002/sim.4780070704.

Examples

Epbias(A_obs = c(50, 30), Se = 0.9, Sp = 0.85, N = c(100, 100))
#> $estimate
#> [1] 46.66667
#> 
#> $a_true
#> [1] 46.66667 20.00000
#> 
#> $a_obs
#> [1] 50 30
#> 
#> $totals
#> [1] 100 100
#> 
#> $prevalence
#> [1] 0.4666667 0.2000000
#> 
#> $or_obs
#> [1] 2.333333
#> 
#> $or_true
#> [1] 3.5
#> 
#> $sensitivity
#> [1] 0.9 0.9
#> 
#> $specificity
#> [1] 0.85 0.85
#> 
#> $n
#> [1] 2
#> 
#> $method
#> [1] "Bias correction for exposure misclassification"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"