stochastic_market_selector: Stochastic Market Selector.

View source: R/pre_test_power.R

stochastic_market_selectorR Documentation

Stochastic Market Selector.

Description

[Stable]

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.

Usage

stochastic_market_selector(
  treatment_size,
  similarity_matrix,
  run_stochastic_process = FALSE
)

Arguments

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.

Value

Returns a matrix of sampled combinations of treatments. Each row represents a different treatment.


facebookincubator/GeoLift documentation built on May 31, 2024, 10:09 a.m.