Function to calculate risk difference by unconditional maximum likelihood estimation (Wald) for any given treatment pairs.
Examples
riskdiff_wald(
x = matrix(c(178, 79, 1411, 1486), 2, 2),
conf.level = 0.95
)
#> $data
#> Outcome
#> Predictor Disease1 Disease2 Total
#> Exposed1 178 1411 1589
#> Exposed2 79 1486 1565
#> Total 257 2897 3154
#>
#> $measure
#> risk difference with 95% C.I.
#> Predictor estimate lower upper
#> Exposed1 1.00000000 NA NA
#> Exposed2 -0.06154091 -0.08046517 -0.04261664
#>
#> $p.value
#> two-sided
#> Predictor midp.exact fisher.exact chi.square
#> Exposed1 NA NA NA
#> Exposed2 1.780016e-10 1.845304e-10 2.676407e-10
#>
#> $correction
#> [1] FALSE
#>
#> attr(,"method")
#> [1] "Unconditional MLE & normal approximation (Wald) CI"