Market Matching
install_github("klarsen1/MarketMatching", build_vignettes=TRUE)
library(MarketMatching)
data(weather, package="MarketMatching")
mm <- best_matches(data=weather,
id_variable="Area",
date_variable="Date",
matching_variable="Mean_TemperatureF",
parallel=TRUE,
warping_limit=1, # warping limit=1
dtw_emphasis=1, # rely only on dtw for pre-screening
matches=5, # request 5 matches
start_match_period="2014-01-01",
end_match_period="2014-10-01")
results <- MarketMatching::inference(matched_markets = mm,
test_market = "CPH",
end_post_period = "2015-10-01")