Skip to contents

[Stable]

MarketCorrelations calculates a notion of similarity between markets to help inform the combinations of treatments.

Usage

MarketCorrelations(data)

Arguments

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.

Value

A Dataframe where each column represents the closest market to the market in the first column, ordering them by their correlation factor.

Examples

geo_pre <- GeoDataRead(GeoLift_PreTest, date_id = "date", location_id = "location",
  Y_id = "Y", format = "yyyy-mm-dd")
MarketCorrelations(geo_pre)[1:3, 1:4]
#> # A tibble: 3 × 4
#>   var1      location_3   location_4    location_5 
#>   <chr>     <chr>        <chr>         <chr>      
#> 1 atlanta   chicago      las vegas     cleveland  
#> 2 austin    oakland      oklahoma city kansas city
#> 3 baltimore philadelphia reno          chicago