$$RD = p_e - p_u$$ with the binomial variance \(p_e(1-p_e)/n_e + p_u(1-p_u)/n_u\). The arm sizes are optional; without them only the point estimate is defined.
Examples
Riskdf(0.3, 0.2, 100, 100)
#> $estimate
#> [1] 0.1
#>
#> $se
#> [1] 0.06082763
#>
#> $ci_lower
#> [1] -0.01921995
#>
#> $ci_upper
#> [1] 0.21922
#>
#> $p_exposed
#> [1] 0.3
#>
#> $p_unexposed
#> [1] 0.2
#>
#> $confidence
#> [1] 0.95
#>
#> $method
#> [1] "risk difference (Rothman & Greenland)"
#>
