DoROASPreanalysis: Predicts the standard deviation (standard error) of the...

Description Usage Arguments Value Note

View source: R/doroaspreanalysis.R

Description

Predicts the standard deviation (standard error) of the posterior of the iROAS estimator.

Usage

1
2
3
4
5
6
7
8
9
DoROASPreanalysis(obj, ...)

## S3 method for class 'GeoTimeseries'
DoROASPreanalysis(obj, period.lengths, geos,
  recycle = TRUE, ...)

## S3 method for class 'GeoExperimentPreanalysisData'
DoROASPreanalysis(obj, response, prop.to,
  n.sims = 1000, models = GetModelIds(), FUN = base::lapply, ...)

Arguments

obj

an object.

...

further arguments passed to or from other methods.

period.lengths

a vector of length 3, denoting the lengths (in days) of pre-period, test, and the cooldown periods, respectively. The test period must be at least 7 days; the pre-period must be at least as long as the test period; the cooldown period can be 0 or more days.

geos

(GeoStrata or GeoAssignment object) object to use for choosing the geo groups; if it is a GeoAssignment object, the geo assignment will be fixed. If it is a GeoStrata object, method Randomize will be used to obtain a geo assignment at each iteration.

recycle

(flag) if TRUE, uses an augmented data set in order to create a larger time series, reusing data from the head of the time series.

response

(string) name of the metric column to use as the response variable.

prop.to

(string) an existing name of the column in proportion to which the spend change will be distributed across the geos.

n.sims

(integer or NA) number of simulations to do. Note: if 'geos' is a GeoAssignment object, NA is allowed, and the actual number of simulations will be the number of all possible pseudo-data sets; if n.sims is given, only the first n.sims data sets will be simulated (useful for testing only).

models

(vector of nonempty strings) one or more analysis model ids, to apply to each simulated data set.

FUN

(function) a lapply-compatible function to use for generating the simulations. Use this for a parallel version of lapply to speed up the process. Note: the function only needs to be able to iterate along a vector of integers.

Value

A ROASPreanalysisFit object.

A ROASPreanalysisFit object.

Note

DoROASPreanalysis.GeoTimeseries is a wrapper, combining calls to GeoExperimentPreanalysisData and DoROASPreanalysis.

DoROASPreanalysis.GeoTimeseries: The extra arguments ... are passed to DoROASPreanalysis.GeoExperimentPreanalysisData.

Simulates experiments without resorting to regenerating time series. Segments of the original time series are used to create 'pseudo-timeseries' of the length of the experiment. These simulated geo experiment data sets are produced by calls to SimulateGeoExperimentData.

The object that is returned contains the simulated raw numbers. Use the summary method for a more user-friendly output.

DoROASPreanalysis.GeoExperimentPreanalysisData: The extra arguments ... are passed to FUN.


google/GeoexperimentsResearch documentation built on May 17, 2019, 7:42 a.m.