This is a function to conveniently and quickly compute the absolute relative risk (ARR) and its confidence interval.

arr(
  expPos,
  expN,
  conPos,
  conN,
  conf.level = 0.95,
  digits = 2,
  printAsPercentage = TRUE
)

# S3 method for ufsARR
print(x, digits = x$digits, printAsPercentage = x$printAsPercentage, ...)

Arguments

expPos

Number of positive events in the experimental condition.

expN

Total number of cases in the experimental condition.

conPos

Number of positive events in the control condition.

conN

Total number of cases in the control condition.

conf.level

The confidence level for the confidence interval.

digits

The number of digits to round to when printing the results.

printAsPercentage

Whether to multiply with 100 when printing the results.

x

The result of the call to arr.

...

Any additional arguments are neglected.

Value

An object with in estimate, the ARR, and in conf.int, the confidence interval.

Examples

ufs::arr(10, 60, 20, 60);
#> Absolute Risk Reduction = [1.46; 31.87] (point estimate: 16.67)