MultiCellPower: Multi-Cell Power Analysis Method.

View source: R/MultiCell.R

MultiCellPowerR Documentation

Multi-Cell Power Analysis Method.

Description

[Experimental]

MultiCellPower performs a Power-Analysis for a given set of Market Selections obtained from MultiCellMarketSelection.

Usage

MultiCellPower(
  x,
  test_markets = list(),
  effect_size = seq(-0.25, 0.25, 0.05),
  lookback_window = NULL,
  side_of_test = NULL,
  conformal_type = "iid",
  ns = 1000
)

## S3 method for class 'MultiCellPower'
print(x, ...)

## S3 method for class 'MultiCellPower'
plot(
  x,
  actual_values = TRUE,
  smoothed_values = FALSE,
  show_mde = TRUE,
  breaks_x_axis = 10,
  stacked = TRUE,
  ...
)

Arguments

x

MultiCellMarketSelection()

test_markets

List of market IDs per cell. The list must contain exactly k numeric values corresponding to the power analysis. The list's layout must be: list(cell_1 = 1, cell2 = 1, cell3 = 1,...).

effect_size

A vector of effect sizes to test by default a sequence between 0 - 25 percent in 5 percent increments: seq(0,0.25,0.05). Make sure that the sequence includes zero.

lookback_window

A number indicating how far back in time the simulations for the power analysis should go. For instance, a value equal to 5 will simulate power for the last five possible tests. By default lookback_window = 1 which will only execute the most recent test based on the data.

side_of_test

A string indicating whether confidence will be determined using a one sided or a two sided test. If set to NULL (default), the side_of_test will be populated by the value specified in MultiCellMarketSelection.

  • "two_sided": The test statistic is the sum of all treatment effects, i.e. sum(abs(x)). Defualt.

  • "one_sided": One-sided test against positive or negaative effects i.e. If the effect being applied is negative, then defaults to -sum(x). H0: ES >= 0; HA: ES < 0. If the effect being applied is positive, then defaults to sum(x). H0: ES <= 0; HA: ES > 0.

conformal_type

Type of conformal inference used. Can be either "iid" for Independent and identically distributed or "block" for moving block permutations. Set to "iid" by default.

ns

Number of resamples for "iid" permutations if ⁠conformal_type = "iid⁠. Set to 1000 by default.

...

additional arguments

actual_values

Logic flag indicating whether to include in the plot the actual values. TRUE by default.

smoothed_values

Logic flag indicating whether to include in the plot the smoothed values. TRUE by default.

show_mde

Logic flag indicating whether to include in the plot the positive and negative MDEs. FALSE by default.

breaks_x_axis

Numeric value indicating the number of breaks in the x-axis of the power plot. You may get slightly more or fewer breaks that requested based on breaks_pretty(). Set to 10 by default.

stacked

Logic flag indicating whether to stack all the Multi-Cell plots together vertically or to output each one of them separately. Set to TRUE by default.

Value

A 'MultiCellPower' object with three objects:

  • "PowerCurves": List containing the Power Curves for each cell.

  • "data": The input data.

  • "test_details": The test details.

MultiCellPower output message


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