Learn R Programming

ufs (version 0.5.12)

arr: Absolute Relative Risk and confidence interval

Description

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

Usage

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, ...)

Value

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

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.

Examples

Run this code
ufs::arr(10, 60, 20, 60);

Run the code above in your browser using DataLab