plotCorrels: Plotting function for historical correlations between the...

View source: R/plots.R

plotCorrelsR Documentation

Plotting function for historical correlations between the test market's and total markets KPI.

Description

[Stable]

plotCorrels takes a data frame used for GeoLift to generate a plot that show historical similarities in KPI levels between the test markets and the aggregation of all locations (total).

Usage

plotCorrels(data, locs = c(), scaled = TRUE, KPI_id = "", dtw = 0)

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.

locs

List of markets to use in the calculation of the correlations.

scaled

A logic flag indicating whether to plot the scaled values of the KPI metric (standardized by the largest historical value). Set to FALSE by default to plot the observed KPI levels.

KPI_id

Outcome variable.

dtw

Emphasis on Dynamic Time Warping (DTW), dtw = 1 focuses exclusively on this metric while dtw = 0 (default) relies on correlations only.

Value

A plot of the historical values of the test market and the aggregation of all control markets.


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