fn_treatment | R Documentation |
fn_treatment
generates the treatment variable D, where
D = 1 for test locations in the test period and D = 0 otherwise.
fn_treatment(df, locations, treatment_start_time, treatment_end_time)
df |
A data.frame containing the historical conversions by geographic unit. It requires a "locations" column with the geo name, a "Y" column with the outcome data (units), a time column with the indicator of the time period (starting at 1), and covariates. |
locations |
List of names of the test locations (String). |
treatment_start_time |
Time index of the start of the treatment. |
treatment_end_time |
Time index of the end of the treatment. |
Data frame with the additional treatment variable (D).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.