Skip to contents

With true risks r1, r0, prevalence prevalence, sensitivity and specificity, the measured risk difference is \((se+sp-1)(r_1-r_0)\,\pi(1-\pi)/(d_1 d_0)\) with \(d_1, d_0\) the measured group shares (Research.P2.Misclassification.binary_attenuation), so it keeps the sign of the true difference whenever \(se + sp \ge 1\) (binary_sign). For an ordinal exposure see morie_misclassified_contrast.

Usage

morie_misclassified_rd(r1, r0, prevalence, sensitivity, specificity)

Arguments

r1, r0

True outcome risks among the exposed and the unexposed.

prevalence

True exposure prevalence, in (0, 1).

sensitivity, specificity

Of the exposure measurement, in \([0, 1]\).

Value

A list: true_rd, measured_rd, factor (measured_rd / true_rd), d1, d0 and sign_kept.

References

Hernan MA, Robins JM (2020). Causal Inference: What If, Fine Point 9.1. CRC.

Examples

morie_misclassified_rd(r1 = 0.3, r0 = 0.1, prevalence = 0.4, sensitivity = 0.8, specificity = 0.9)
#> $true_rd
#> [1] 0.2
#> 
#> $measured_rd
#> [1] 0.1426146
#> 
#> $factor
#> [1] 0.713073
#> 
#> $d1
#> [1] 0.38
#> 
#> $d0
#> [1] 0.62
#> 
#> $sign_kept
#> [1] TRUE
#> 
#> attr(,"theorem")
#> [1] "Research.P2.Misclassification.binary_attenuation"