epi_inc: Estimate incidence rate

View source: R/epi_inc.R

epi_incR Documentation

Estimate incidence rate

Description

Wrap data from a dataframe and send to epiR::epi.conf (or pass through table). To calculate an incidence rate using cases and time at risk

Usage

epi_inc(x, y, z = NULL, conf_level = 0.95, methods = "exact", ...)

Arguments

x

A dataframe or number of cases

y

See details

z

See details

conf_level

confidence level for estimates

methods

estimation methods for CI to be passes to epiR::epi_conf

...

Other parameters passed on to epiR::epi.conf

Details

If used with a dataframe use epi_inc(dataframe, cases-expression, time_at_risk-column, ...)

If used with summary data use epi_inc(number-of-cases, time-at-risk, ...)

Value

Returns a tibble

Examples

head(mtcars)
# using a dataframe...
epi_inc(mtcars, cyl == 4, disp, conf_level = 0.95)
# using summary data
epi_inc(70, 1010, conf_level = 0.95)

ianhandel/epidemr documentation built on April 13, 2022, 11:08 a.m.