📐 Prior Setting Google Sheet

This tutorial will walk through each part of the prior configuration Google Sheet, detailing the way to format things and the possible values. The goal of this is not to provide guidance on how to choose priors, only on how to tell us what your priors are once they’ve been chosen. For our (currently under construction) guide on how to think about priors, see this section and for some client facing documentation on how to explain the information you're looking for, see this doc.

The filled out example sheet for demo can be found here.

Model Info Tab

Screenshot 2023-10-18 at 3.39.51 PM.png

Fields:

  • Name - The model name. This will be used to ensure your run is linked to the proper dashboard in the Recast app. We will establish this name during onboarding and you will use the same name for every run that should end up in that dashboard. Changing this name without coordinating with Recast will result in model run errors.
  • DepvarName - This is to identify which column in your clean data to look for the dependent variable. For convenience, this is often the same as the model name. Currently, this also has to be pre-determined with your Recast team, and cannot change (although this may change in the future).
  • As-of Date - This is typically the date (formatted yyyy-mm-dd) you set your priors. This is used as a reference point (more info can be found in the prior setting tutorials). It should be a day in your clean data.
  • MonthsToUse - This is how many months of data to use in your model. If your dataset has more months than MonthsToUse, the oldest days will be trimmed. If it has less, Recast will use all available data.

Intercept Tab

Screenshot 2023-10-18 at 3.46.23 PM.png

InterceptMidpoint, InterceptLower, and InterceptUpper are the prior bounds you want to set on the proportion of the dependent variable being driven organically. They should be numbers between 0-1. The actual priors used in the Recast model are calculated by taking the median of the last thirty day depvar and multiplying it by the midpoint, lower, and upper.

Channels Tab

Screenshot 2023-10-18 at 4.06.07 PM.png

One row for each marketing channel in your model.

Fields:

  • Name - the variable name as it appears in your clean data
  • Type - One of “Predictor” or “Lower-funnel”; distinguishing whether it’s an upper funnel or lower funnel marketing channel
  • Incrementality Midpoint/Lower/Upper - The ROI or CPA prior on the effectiveness of spend
  • Spend level - The level of daily spend that the ROI prior applies to. For example, if the spend level is $10k, the ROI prior will be constrained between Lower and Upper at $10k, but the prior at $1k of daily spend will be higher (if the channel does not saturate)
  • Exclude from saturation - either TRUE or blank. Whether or not the channel should be excluded from saturating. If excluded any level of spend will produce the same effect
  • Shift Midpoint/Lower/Upper - The priors on the shift. These bounds are interpreted as the possible number of days before 95% of the effect has been observed
  • Concentration - the concentration parameter. Valid values are 1, 3, 10, and 15
  • Exclude from shift - TRUE or blank, whether to have all the channel’s effect happen on the day of spend or not
  • Units - Blank if the channel is a spend channel, text for any other type of predictor (like 'emails'). Be careful setting ROI priors on these channels, as you'll likely need a much different range than a typical spend channel.
  • Non-Moving TRUE or blank. If TRUE, the channel will be estimated to have a constant performance beta parameter (ROI will still change due to saturation + contextual variable effects). This can be useful for small channels since it reduces the number of parameters in the model (which likely don't have good signal to estimate anyway).

Context Variable Tab

Screenshot 2023-10-24 at 8.57.00 AM.png

One row for each context variable in your model. Details on what values to choose are laid out here.

Fields:

  • Name - the context variable name as it appears in your clean data
  • Log - TRUE if the value should be log transformed, blank if not
  • Smoothing Type - Blank for no smoothing. Other values are “Rollmean-center”, “Rollmean-right”, “Rollmean-left” and “Loess”
  • Smooth Days - The number of days to include in the smoothing window. Not applicable for Loess
  • Scaling Factor - The number to divide by to put the context variable on the right scale
  • Reference Unit - The number to use as a reference point in the displayed dash.
  • Unit Type - One of “Percentage”, “PercentagePoint”, “Units”, “Currency”, “Binary”

Spikes Tab

Screenshot 2023-10-24 at 9.04.11 AM.png

One row for each spike you want in the model.

Fields:

  • Spike Group - What spike group the spike should live in
  • Additive Spike - TRUE to make the spike an additive spike, blank otherwise
  • Saturation Spike - TRUE to make the spike a saturation spike, blank otherwise (note: spikes can be both additive and saturation, and they have to be at least one)
  • Main Date - the date of the spike in yyyy-mm-dd format

Incrementality Tests Tab

Screenshot 2023-10-24 at 9.08.22 AM.png

One row for each incrementality test you want to include in the model.

Fields:

  • Variable - Name of the variable (matches what’s in Variable tab)
  • Start date - Start date of the test, formatted yyyy-mm-dd
  • End date - End date of the test, formatted yyyy-mm-dd
  • Point Estimate - The incremental point estimate
  • Uncertainty - The standard error of the test
  • Type - One of “Average effect”, “Incremental Effect”
  • Time - One of “Cumulative”, “Daily”, “Bookend”
  • Include lower funnel effects in the prior? - TRUE or blank (NOTE: please leave blank for now, this functionality is not yet implemented fully in the model)

Version Tab

This indicates the SchemaVersion number. This will be kept up to date on our template sheet and should be left as is. It helps our system know what version of the sheet you’re using.