View source: R/pre_test_power.R
stochastic_market_selector | R Documentation |
stochastic_market_selector
selects the markets to be tested
by randomly sampling from the similarity_matrix
.
It gets groups of 2 elements and samples one of them. It repeats
this process until the treatment_size
is equal to the sample.
stochastic_market_selector(
treatment_size,
similarity_matrix,
run_stochastic_process = FALSE
)
treatment_size |
Is the amount of location units within the treatment group. |
similarity_matrix |
Matrix that sorts each location in terms of descending correlation. |
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. |
Returns a matrix of sampled combinations of treatments. Each row represents a different treatment.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.