View source: R/pre_test_power.R
GeoLiftPowerFinder | R Documentation |
Development on GeoLiftPowerFinder()
is complete.
We recommend switching to GeoLiftMarketSelection()
for new code, which is easier to use, more featureful,
and still under active development.
GeoLiftPowerFinder
provides power calculations for unknown
test markets, number of test locations, and test duration.
GeoLiftPowerFinder(
data,
treatment_periods,
N = 1,
X = c(),
Y_id = "Y",
location_id = "location",
time_id = "time",
effect_size = seq(0, 0.25, 0.05),
top_results = 5,
alpha = 0.1,
normalize = FALSE,
model = "none",
fixed_effects = TRUE,
dtw = 0,
ProgressBar = FALSE,
plot_best = FALSE,
run_stochastic_process = FALSE,
parallel = TRUE,
parallel_setup = "sequential",
side_of_test = "two_sided",
import_augsynth_from = "library(augsynth)",
import_tidyr_from = "library(tidyr)"
)
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. |
treatment_periods |
List of treatment periods to calculate power for. |
N |
List of number of test markets to calculate power for. |
X |
List of names of covariates. |
Y_id |
Name of the outcome variable (String). |
location_id |
Name of the location variable (String). |
time_id |
Name of the time variable (String). |
effect_size |
A vector of effect sizes to test by default a sequence between 0 - 25 percent in 5 percent increments: seq(0,0.25,0.05). Make sure that the sequence includes zero. |
top_results |
Number of results to display. |
alpha |
Significance Level. By default 0.1. |
normalize |
A logic flag indicating whether to scale the outcome which is useful to accelerate computing speed when the magnitude of the data is large. The default is FALSE. |
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. |
dtw |
Emphasis on Dynamic Time Warping (DTW), dtw = 1 focuses exclusively on this metric while dtw = 0 (default) relies on correlations only. |
ProgressBar |
A logic flag indicating whether to display a progress bar to track progress. Set to FALSE by default. |
plot_best |
A logic flag indicating whether to plot the best 4 tests for each treatment length. Set to FALSE by default. |
run_stochastic_process |
A logic flag indicating whether to select test markets through random sampling of the the similarity matrix. Given that interpolation biases may be relevant if the synthetic control matches the characteristics of the test unit by averaging away large discrepancies between the characteristics of the test and the units in the synthetic controls, it is recommended to only use random sampling after making sure all units are similar. This parameter is set by default to FALSE. |
parallel |
A logic flag indicating whether to use parallel computing to speed up calculations. Set to TRUE by default. |
parallel_setup |
A string indicating parallel workers set-up. Set to "sequential" by default. |
side_of_test |
A string indicating whether confidence will be determined using a one sided or a two sided test.
|
import_augsynth_from |
Points to where the augsynth package should be imported from to send to the nodes. |
import_tidyr_from |
Points to where the tidyr package should be imported from to send to the nodes. |
Data frame with the ordered list of best locations and their average power.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.