limit_test_markets determines if the user would like
to find combinations of treatments that is higher than half
the total amount of locations available while running a random
assignment of locations. If this is the case, it will cap the
treatment sizes at half the total amount of locations.
Arguments
- similarity_matrix
Matrix that sorts each location in terms of descending correlation.
- treatment_sizes
Vector of number of test markets to calculate power for.
- 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. Set to FALSE by default.
Value
Returns the limited number of treatment sizes if required. If the condition is not met, it returns the original treatment sizes.
Examples
geo_pre <- GeoDataRead(GeoLift_PreTest, date_id = "date", location_id = "location",
Y_id = "Y", format = "yyyy-mm-dd")
limit_test_markets(MarketSelection(geo_pre), treatment_sizes = c(2, 3, 50))
#> [1] 2 3 50