| prep_data | R Documentation |
Prepare a data frame to work with sdid() function
prep_data(df, cohort_var, cohort_ref = NULL, time_var, time_ref = NULL)
df |
A data frame containing the variables in the model. |
cohort_var |
String specifying the name of the column in |
cohort_ref |
An optional string specifying the value of |
time_var |
String specifying the name of the column in |
time_ref |
An optional string specifying the value of |
data.frame
dta_prepped <- prep_data(hosp,
cohort_var = "cohort",
cohort_ref = "0",
time_var = "yr",
time_ref = "2010")
head(dta_prepped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.