CalculateROAS: Calculate ROAS or mROAS.

Description Usage Arguments Value

Description

This functions takes the original budget settings and a counterfactual budget setting. It reports the expected ratio between the total difference in revenue over all time points and the total difference in media spend over all time points.

Usage

1
2
3
4
5
6
CalculateROAS(object, new.budget = NULL,
  media.names = object$params$media.names, budget.periods = NULL,
  budget.proportion = rep(0, length(media.names)), t.start = 1,
  t.end = object$params$time.n, scaled.pop.size = 1e+18, min.reps = 2,
  max.coef.var = 0.01, max.margin.error = 0.01, max.time = 0,
  verbose = FALSE)

Arguments

object

amss.sim object containing simulated data

new.budget

table of new budgets for each budget period (row) and media channel (column)

media.names

if new.budget is NULL, adjust original budget of the media named here.

budget.periods

budget.periods over which to modify the budget. Default NULL will lead to all budget periods being modified.

budget.proportion

nonnegative numeric. When new.budget is NULL, it is calculated by setting the budget of the media channels specified in media.names to budget.proportion proportion of the original budget during the budget periods specified in budget.periods. The default proportion of 0 is used to calculate the average ROAS over the entire spend in the channel. Values such as 0.99 can be used to calculate the marginal ROAS.

t.start

time point to start generating data according to the new settings.

t.end

last time point to generate data according to the new settings. In scenarios with lag, this should extend past the last time point in the modified budget periods in order to include lagged effects in the calculation.

scaled.pop.size

CalculateROAS scales up the population size to reduce the variability of its estimates. This is equivalent to running the simulation for multiple repetitions to reduce variability. The default value should provide sufficient accuracy in most use cases. Extremely large values may result in numerical issues.

min.reps

integer representing the initial number of datasets to generate from each budget setting. The default value of 2 allows the user to make a rough check that the accuracy is indeed good under the chosen settings. This default was chosen under the assumption that the default scaled.pop.size is large enough to accurately measure ROAS using 1 repetition, with the 2nd being used as confirmation of the accuracy. Higher precision and more accurate measurement of the precision can be achieved with more repetitions.

max.coef.var

numeric, the target coefficient of variation. The function takes additional samples of the ROAS until it runs out of time, attains the target coefficient of variation, or attains the target margin of error.

max.margin.error

numeric, the target margin of error. The function takes additional samples of the ROAS until it runs out of time, attains the target coefficient of variation, or attains the target margin of error.

max.time

numeric, the number of minutes at which to cut off the function from taking additional samples beyond the initial sample generated according to min.reps. The function takes additional samples of the ROAS until it runs out of time, attains the target coefficient of variation, or attains the target margin of error. The default value of 0 forces the function to use precisely min.reps repetitions.

verbose

boolean. If TRUE, output measures of the accuracy of the reported ROAS, including the full sample of ROAS values.

Value

numeric value for ROAS, or, if verbose = TRUE, a list with the roas, the 95 sample ROAS values.


google/amss documentation built on May 20, 2019, 5:05 p.m.