reshape_for_SIR: Data reshaping for indirect adjustment

Description Usage Arguments Value

View source: R/sir.R

Description

Reshape data to four columns for indirect adjustment.

Usage

1
reshape_for_SIR(df, strata, split_var, study_group, n, pop)

Arguments

df

A data frame.

strata

Variable that contains strata (such as age).

split_var

Variable to split into study and referent groups.

study_group

Value of split_var to use as study group.

n

Number of events.

pop

Number of person-years at risk.

Value

A data table with the following fields:

strata

Grouping variable

study_count

Events in study group

study_pop

Person-years at risk in study group

ref_count

Events in referent group

ref_pop

Person-years at risk in referent group


mlaviolet/tidyepi documentation built on Feb. 8, 2021, 1:39 p.m.