ratedifference {fmsb} | R Documentation |
Calculate incidence rate difference (a kind of attributable risk / excess risk) and its confidence intervals based on approximation, followed by null hypothesis (rate difference equals to 0) testing.
ratedifference(a, b, PT1, PT0, CRC=FALSE, conf.level=0.95)
a |
The number of disease occurence among exposed cohort. |
b |
The number of disease occurence among unexposed cohort. |
PT1 |
The observed person-time in exposed cohort. |
PT0 |
The observed person-time in unexposed cohort. |
CRC |
Logical. If TRUE, this function also calculates the incidence rates for each cohort and for both combined, with confidence intervals. Default FALSE. |
conf.level |
Probability for confidence intervals. Default is 0.95. |
estimate |
Calculated point estimate of rate difference. |
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. |
Minato Nakazawa (minato-nakazawa[atmark]umin.net)
res <- ratedifference(136,1709,22050,127650,CRC=TRUE,conf.level=0.9) str(res) print(res)