View source: R/post_test_analysis.R
cumulative_lift | R Documentation |
This method will calculate the cumulative lift with each passing day.
cumulative_lift(
data,
locations,
treatment_start_time,
treatment_end_time,
location_id = "location",
time_id = "time",
Y_id = "Y",
X = c(),
alpha = 0.1,
model = "none",
fixed_effects = TRUE,
method = "conformal",
grid_size = 250,
stat_test = "Total",
conformal_type = "iid",
ns = 1000
)
data |
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 test locations. |
treatment_start_time |
Time index of the start of the treatment. |
treatment_end_time |
Time index of the end of the treatment. |
location_id |
Name of the location variable (String). |
time_id |
Name of the time variable (String). |
Y_id |
Name of the outcome variable (String). |
X |
List of names of covariates. |
alpha |
Significance level. Set to 0.1 by default. |
model |
A string indicating the outcome model used to augment the Augmented Synthetic Control Method. Augmentation through a prognostic function can improve fit and reduce L2 imbalance metrics.
|
fixed_effects |
A logic flag indicating whether to include unit fixed effects in the model. Set to TRUE by default. |
method |
A string indicating the method used to calculate the aggregate ATT Confidence Intervals.
|
grid_size |
Number of grid points to use when inverting the hypothesis test for Conformal Inference. Set to 250 by default. |
stat_test |
A string indicating the test statistic.
|
conformal_type |
Type of conformal inference used. Can be either "iid" for Independent and identically distributed or "block" for moving block permutations. Set to "iid" by default. |
ns |
Number of resamples for "iid" permutations if |
A dataframe that holds the accumulated lift effect throughout the entire treatment period.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.