gt_attackrate: A mortality rate wrapper function (using the gtsummary...

add_mrR Documentation

A mortality rate wrapper function (using the gtsummary package)that takes a gtsummary object and returns a gtsummary object with attack rate (per given multiple) with 95% confidence interval

Description

A mortality rate wrapper function (using the gtsummary package)that takes a gtsummary object and returns a gtsummary object with attack rate (per given multiple) with 95% confidence interval

An attack rate wrapper function (using the gtsummary package)that takes a gtsummary object and returns a gtsummary object withattack rate (per given multiple) with 95% confidence interval

An case fatality rate wrapper function (using the gtsummary package) that takes a gtsummary object and returns a gtsummary object with number of deaths, case fatality rate, and 95% confidence interval.

Usage

add_mr(
  gts_object,
  deaths_var,
  population = NULL,
  multiplier = 10^4,
  drop_tblsummary_stat = FALSE
)

add_ar(
  gts_object,
  case_var,
  population = NULL,
  multiplier = 10^4,
  drop_tblsummary_stat = FALSE
)

add_cfr(gts_object, deaths_var)

Arguments

gts_object

A data frame, passed by the gtsummary::add_stat function.

deaths_var

the name of a logical column in the data that indicates that the case died, is passed as the first argument to epitabulate::case_fatality_rate_df

multiplier

The base by which to multiply the output:

data

A data frame, passed by the gtsummary::add_stat function.

variable

Name of a variable as the outcome of interest, passed by the gtsummary::add_stat function (e.g. illness).

by

Name of a variable for stratifying, passed by the gtsummary::add_stat function (e.g. illness).

...

additional params that may be passed from gtsummary functions.

Value

a single-row gtsummary object with attack rate results cases, population, attack rate, and 95% confidence interval.

a single-row gtsummary object with attack rate results cases, population, attack rate, and 95% confidence interval.

a single row gtsummary object with case fatality rate results for deaths, cases, cfr, and 95% confidence interval.


R4EPI/tuni documentation built on March 20, 2023, 4:37 p.m.