Skip to contents

Each true level has a risk and a weight; the measurement sends levels to a measured group. The measured contrast between two groups is the difference of their weighted mean risks, which can be zero or of the opposite sign to the true top-versus-bottom contrast when the map is not monotone (Research.P2.Misclassification.ordinal_witness, ordinal_reversal). The binary attenuation theorem is a binary theorem.

Usage

morie_misclassified_contrast(
  risks,
  group,
  weights = rep(1, length(risks)),
  high = "high",
  low = "low"
)

Arguments

risks

Outcome risk at each true level, ordered from lowest to highest level.

group

Measured group label of each level.

weights

Prevalence weight of each level.

high, low

The two measured groups to contrast.

Value

A list: true_contrast (top minus bottom level), measured_contrast (high minus low), group_risk and reversed.

References

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

Examples

morie_misclassified_contrast(risks = c(0, 0.5, 1), group = c("high", "low", "high"))
#> $true_contrast
#> [1] 1
#> 
#> $measured_contrast
#> [1] 0
#> 
#> $group_risk
#> high  low 
#>  0.5  0.5 
#> 
#> $reversed
#> [1] TRUE
#> 
#> attr(,"theorem")
#> [1] "Research.P2.Misclassification.ordinal_witness"