ComputeLinearModelWeights: Computes the weights to be used in the weighted linear model...

Description Usage Arguments Value Note

View source: R/utils_analysis.R

Description

Computes the weights to be used in the weighted linear model used to estimate ROAS.

Usage

1

Arguments

response

a vector of the response in the pre period. Length equal to the number of geos. Must be all nonnegative.

power

default power to which 'response' is raised to. Can be overridden by setting the global option 'geoexperiments.gbr1.weight.power'. Must be nonnegative.

Value

A vector of weights of the same length as 'response'. Data points with response == 0 have weight NA (indicating these need to be taken special care of). There is an attribute 'power' corresponding to the exponent used.

Note

If a component of 'response' tends to infinity, the corresponding weight tends to 0 (i.e., the corresponding data point is ignored).


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