fit_spend_exposure | R Documentation |
This function is called in robyn_engineering()
. It uses
the Michaelis-Menten function to fit the nonlinear model. Fallback
model is the simple linear model lm()
in case the nonlinear
model is fitting worse. A bad fit here might result in unreasonable
model results. Two options are recommended: Either splitting the
channel into sub-channels to achieve better fit, or just use
spend as paid_media_vars
fit_spend_exposure(dt_spendModInput, mediaCostFactor, paid_media_var)
dt_spendModInput |
data.frame. Containing channel spends and exposure data. |
mediaCostFactor |
Numeric vector. The ratio between raw media exposure and spend metrics. |
paid_media_var |
Character. Paid media variable. |
List. Containing the all spend-exposure model results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.