Description Usage Arguments Value Note
View source: R/utils_analysis.R
Computes the weights to be used in the weighted linear model used to estimate ROAS.
1 | ComputeLinearModelWeights(response, power = 2)
|
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. |
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.
If a component of 'response' tends to infinity, the corresponding weight tends to 0 (i.e., the corresponding data point is ignored).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.