fmsb (version 0.5.2)

riskratio: Calculate risk ratio and its confidence intervals

Description

Calculate risk ratio (a kind of relative risk) and its confidence intervals based on approximation, followed by null hypothesis (risk ratio equals to 1) testing.

Usage

riskratio(X, Y, m1, m2, conf.level=0.95)

Arguments

X
The number of disease occurence among exposed cohort.
Y
The number of disease occurence among non-exposed cohort.
m1
The number of individuals in exposed cohort group.
m2
The number of individuals in non-exposed cohort group.
conf.level
Probability for confidence intervals. Default is 0.95.

Value

estimate
Calculated point estimate of risk ratio.
conf.int
A numeric vector of length 2 to give upper/lower limit of confidence intervals.
p.value
The significant probability of the result of null-hypothesis testing.

Examples

Run this code
 res <- riskratio(5, 10, 90, 90)
 str(res)
 print(res)

Run the code above in your browser using DataLab