All functions

add_fourier_vars()

computes variables suitable for seasonality predictors

add_groups_and_sort()

sorts and groups data per the variable controls table

add_steps_media()

loops over the variable control table to add media transformations based on either variable specific transformations or tunable ranges

assemble_workflow()

creates a tidymodels workflow from a a recipe and a model

asymptote()

dial (ie from the tune package) for asymptote

bake(<step_adstock>)

bake method for step_adstock

bake(<step_saturation>)

The saturation bake method

bulk_add_role()

loops over the variable control table to assign second rolls within a recipe. These roles control transformations applied and construction of model formulas

bulk_update_role()

loops over the variable control table to assign roles within a recipe. These roles control transformations applied and construction of model formulas

check_if_needs_tune()

check to see if a recipe needs to be finalized before baking

create_formula()

Creates a string that represents a model formula from a recipe and the workflow controls data

create_recipe()

reads the variable controls configuration and dataset to create a recipe, which may include tuning dials

create_ulam_list()

From a combination of arguments and the user specified priors, creates the final list of expressions that rethinking::ulam uses to build the stan model block. Currently only allows additive normal model with all media transformations applied before the regression is run. Currently only allows for random intercepts.

get_adstock()

function used to compute adstock transformation

get_control()

Pulls values from the control tibble by name; convenience function for working with the control tibble.

get_decomps_irregardless()

get decomps agnostic to multiplicative or additive model specification

get_id_vector()

pulls vector of identification variables from recipe using role== group or role==time_id

get_outcome_vector()

pulls outcome variable from recipe using role== group or role==time_id

get_predictors_vector()

pulls predictor variable names from a recipe except those that have role2 %in% c('group','time')

get_train_saturation()

a monotonic saturation function with monotonic first deriviate used in recipes for preprocssing MMM data

make_bound_statements()

converts sign constraints in the variable configuration table to rethinking::ulam ready constraints.

make_list_of_fft_formulae()

create a list of model formula (per the rules for lmer()) with different seasonality specifications as listed in the configuration tibble.

make_list_of_rands_formula()

produce a list of formula for testing combinations of random effects

make_prior_statements()

Creates sampling statements for user defined priors on individual variables.

predict(<ulam>)

a prediction function for ulam objects, as comes from rethinking::ulam

prep(<step_adstock>)

Prep method for step_adstock

prep(<step_saturation>)

The saturation step prep method

print(<step_adstock>)

custom print method for adstock steps

print(<step_saturation>)

print method for saturation steps

rename_columns_per_controls()

renames columns in data per the controls file

retention()

establishing retention as a dial using new_quant_param

saturation_speed()

dial (ie from the tune package) for saturation_speed

step_adstock()

function to add saturation trasnformations to a recipe

step_adstock_new()

internal function used in create recipe steps

step_saturation()

function to add saturation trasnformations to a recipe

step_saturation_new()

internal function used in create recipe steps

tunable(<step_adstock>)

tunable method for step_adstock

tunable(<step_saturation>)

tunable method for saturation steps -- used by tune package to identify what each hyperparameter is.