reshape_for_SIR: Data reshaping for indirect adjustment

View source: R/sir.R

reshape_for_SIRR Documentation

Data reshaping for indirect adjustment

Description

Reshape data to four columns for indirect adjustment.

Usage

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 May 14, 2022, 10:04 p.m.