reshape_for_SIR | R Documentation |
Reshape data to four columns for indirect adjustment.
reshape_for_SIR(df, strata, split_var, study_group, n, pop)
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. |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.