Learn R Programming

Robyn (version 3.12.1)

prophet_decomp: Conduct prophet decomposition

Description

When prophet_vars in robyn_inputs() is specified, this function decomposes trend, season, holiday and weekday from the dependent variable.

Usage

prophet_decomp(
  dt_transform,
  dt_holidays,
  prophet_country,
  prophet_vars,
  prophet_signs,
  factor_vars,
  context_vars,
  organic_vars,
  paid_media_spends,
  paid_media_vars,
  intervalType,
  dayInterval,
  custom_params
)

Value

A list containing all prophet decomposition output.

Arguments

dt_transform

A data.frame with all model features. Must contain ds column for time variable values and dep_var column for dependent variable values.

dt_holidays

data.frame. Raw input holiday data. Load standard Prophet holidays using data("dt_prophet_holidays")

context_vars, paid_media_spends, intervalType, dayInterval, prophet_country, prophet_vars, prophet_signs, factor_vars

As included in InputCollect

organic_vars

Character vector. Typically newsletter sendings, push-notifications, social media posts etc. Compared to paid_media_vars organic_vars are often marketing activities without clear spends.

paid_media_vars

Character vector. Names of the paid media variables' exposure level metrics (impressions, clicks, GRP etc) other than spend. The values on each of these variables must be numeric. These variables are not being used to train the model but to check relationship and recommend to split media channels into sub-channels (e.g. fb_retargeting, fb_prospecting, etc.) to gain more variance. paid_media_vars must have same order and length as paid_media_spends respectively and is not required.

custom_params

List. Custom parameters passed to prophet()