fit_spend_exposure {Robyn}R Documentation

Fit a nonlinear model for media spend and exposure

Description

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

Usage

fit_spend_exposure(dt_spendModInput, mediaCostFactor, paid_media_var)

Arguments

dt_spendModInput

data.frame. Containing channel spends and exposure data.

mediaCostFactor

Numeric vector. The ratio between raw media exposure and spend metrics.

Character. Paid media variable.

Value

List. Containing the all spend-exposure model results.


[Package Robyn version 3.11.1 Index]