Syntha Lab RU

Multiple regression of sales: demand drivers, advertising and promo contribution, multicollinearity, lags and model checks

How to estimate the contribution of price, promo, advertising, weather and traffic to sales with one model without crediting an effect to what merely coincided in time: build a regression in logarithms, allow for the delayed action of advertising, check collinearity and residuals and decompose sales into factor contributions (a simplified marketing mix model). The decision: where to put the budget and which elasticity to build into the plan.

Math and analytics Brand and retail Verified: 2026-11-14

Open interactively →

Why this document

The head of marketing and the commercial analyst read this to understand what really moves sales: price, promotion, advertising, weather or traffic. Effects often coincide in time, for instance a promotion runs in season, so a simple comparison credits the wrong cause. Regression separates the contributions, and the multicollinearity check shows where factors cannot be told apart. Lags account for advertising acting with a delay. Without this, budget goes to whatever merely coincided with growth.

At a glance

What is this document and why is it needed?
How to estimate the contribution of price, promo, advertising, weather and traffic to sales with one model without crediting an effect to what merely coincided in time: build a regression in logarithms, allow for the delayed action of advertising, check collinearity and residuals and decompose sales into factor contributions (a simplified marketing mix model). The decision: where to put the budget and which elasticity to build into the plan.
Who owns the document and how often is it rebuilt?
A sales or marketing analyst; the model is recalculated quarterly and after major changes in prices, advertising or channels; read by the commercial director, marketing and finance.
What mistakes are the most common?
A regression of sales on price without season and promo → elasticity biased several-fold → add factors or use log-log with controls. Dozens of factors on a year of data → the model memorizes noise → no more than one factor per 10-15 observations and a hold-out window. Each coefficient is read separately at VIF above 10 → false conclusions that advertising “does not work” → merge factors or check by experiment.

For whom

Brand
A brand models D2C sales and partner sell-out against price, advertising, collaborations and season; the advertising budget and price policy are checked on the model before launch.
Retail
A retailer models store or category sales against traffic, promotions, weather and advertising; the model cleans elasticity and the promo effect of season and traffic.

What it consists of

Why multiple regression

  • Sales depend on many factors at once, and a pairwise regression of sales on price credits price with everything that coincided with it in time. In the example over 104 weeks the naive elasticity estimate is -2.97, the model with promo and weather -1.99, the full model -1.74 against a built-in -1.7: every omitted factor biased the estimate.
  • A model in logarithms: ln(sales) is linear in ln(price), ln(traffic), a promo flag, temperature and an advertising effect. The coefficient on ln(price) is the elasticity, on ln(traffic) the traffic elasticity, on the promo flag roughly the percentage gain (e^β − 1).
  • Regression shows an association holding other factors fixed, not causation: a causal conclusion comes from an experiment (A/B, control weeks), so the model is calibrated against test results and does not replace them.

Factor set and data preparation

  • A weekly grid by store or category of at least 2 years (104 weeks): fewer than 10-15 observations per factor is not acceptable. Sales are cleaned of out-of-stock days, factors are taken for the same week: price (average per receipt), discount share, a promo flag, visitors, temperature, advertising spend.
  • Seasonality enters as factors (temperature, holiday weeks), not subtracted beforehand; then elasticity is cleaned of season. Traffic enters as a factor if it is not created by advertising itself; otherwise the advertising contribution is understated (traffic takes the effect).
  • Hold-out: the last 13 weeks take no part in fitting. In the example the full model errs by 5.9% WAPE on them, the short one without traffic and advertising by 8.2%.
  • Brand: for D2C a weekly grid by channel gives few observations per channel; channel factors are merged into groups (performance, image) or the model moves to daily data.
  • Retailer: the model is built as a store panel with store fixed effects: this increases the number of observations and separates the promotion effect from differences between points.

Advertising lags and multicollinearity

  • Advertising acts not only in the week of exposure: the effect accumulates as A_t + λ·A_(t−1) + λ²·A_(t−2) + … (adstock). The parameter λ is picked by a grid minimizing the residual sum of squares; in the example the best λ = 0.5 and the advertising coefficient is 1.27·10⁻³ with a standard error of 0.35·10⁻³.
  • Multicollinearity: promo, discount and advertising move together (in the example the correlation of promo and advertising spend is 0.95, of promo and ln price -0.96). The variance inflation factor VIF = 1/(1 − R²_j) is 14.8 for promo and 13 for price; values above 10 signal unstable coefficients.
  • Consequence: the coefficient on promo is 0.119 with a standard error of 0.062 and t = 1.9, the confidence interval includes zero. Model predictions remain good; what is weakly determined is the contribution of each factor separately. Remedies: merge factors, separate them in time by an experiment or use more informative priors.

Model checks and factor contribution

  • R² = 0.962, adjusted R² = 0.96: adding a factor always raises R², while the adjusted one penalizes useless factors. Residuals are checked for autocorrelation (Durbin-Watson 1.99, values near 2 are normal), for constant spread and for the absence of structure in the residual-versus-fit plot.
  • Factor contribution (simplified MMM): average sales of 1,053 units a week decompose into a base without price, promo and advertising of 795 units and the contributions of price, promo and advertising. The estimates are approximate: the stronger the collinearity the less determined the split between promo and advertising.
  • Budget conclusions are drawn from the marginal return: the advertising effect saturates, so the sales gain from the next rouble is lower than the average; a regression on the historical range does not know what lies beyond it.

Brand and retailer: what is modeled and how it is read

  • Brand: the dependent variable is D2C or partner sell-out, not shipments; shipments are distorted by buy-in and order seasonality and give false coefficients.
  • Retailer: the dependent variable is store or category sales per week; traffic enters as a factor and elasticity is cleaned of footfall.
  • Brand: advertising spend by channel (performance, bloggers, outdoor) enters as separate factors with different λ; price reflects the price policy across channels.
  • Retailer: promo enters as a flag of promotion type and depth, weather as temperature and precipitation; the post-promotion dip is modeled by a promo lag on following weeks.
  • Brand: the result goes into the marketing budget and the season demand forecast: prices and scenario budgets are put into the model before approval.
  • Retailer: the result goes into the promo calendar and purchasing planning: how much stock to allow for a promotion and which discount depth to choose.

Where the data comes from

Data sourceFields
Weekly sales and pricesSales in units and roubles, average price per receipt, discount share, promo flag and type; by store or category; at least 104 weeks.
Traffic and weatherVisitors from counters or receipts, regional temperature and precipitation, holiday weeks.
MarketingAdvertising spend by week and channel, exposure period, reach; lags need the exact week of spend.

How to build it step by step

  1. Step 1. State the question (elasticity, advertising contribution, promo effect) and choose the dependent variable: weekly unit sales.
  2. Brand: Step 2. Assemble sell-out by channel and spend by advertising channel; do not take partner shipments into the sales model.
  3. Retailer: Step 3. Assemble store sales, traffic, promotions and weather for the same week; drop weeks of closure and refit.
  4. Step 4. Take logarithms of sales, price and traffic; check that the number of weeks is at least 10-15 times the number of factors.
  5. Step 5. Pick the advertising λ by a grid (0-0.9) on the residual sum of squares; a separate λ for each channel.
  6. Step 6. Estimate the model, write out coefficients, standard errors, t and 95% intervals; check signs: price negative, traffic positive.
  7. Step 7. Compute VIF and factor correlations; at VIF above 10 merge factors or do not interpret them separately.
  8. Step 8. Check residuals (autocorrelation, spread, structure) and the hold-out error; a model that does not beat seasonal naive is not used.
  9. Brand: Step 9. Decompose sales into contributions and compare channel returns at the marginal rouble; take the budget decision with a check test (a region without advertising).
  10. Retailer: Step 10. Put the discount depth and promotion traffic into the model, get a sales forecast and compare it with promotion cost; reconcile with control stores.

Formulas

MeasureFormulasNote
OLS estimateβ̂ = (XᵀX)⁻¹·Xᵀ·y, ŷ = X·β̂, e = y − ŷX includes a column of ones; with near-linear dependence of columns XᵀX is badly invertible.
Errors and intervalss² = Σe²/(n − k); SE(β̂_j) = √( s²·[(XᵀX)⁻¹]_jj ); β̂_j ± t_(0.975; n−k)·SEk is the number of coefficients including the intercept; sample estimate, divisor n − k.
Adjusted R²R²_adj = 1 − (1 − R²)·(n − 1)/(n − k)Compares models with different numbers of factors.
Variance inflation factorVIF_j = 1 / (1 − R²_j), R²_j from regressing factor j on the othersAbove 10 is an alarm; the coefficient variance grows by a factor of VIF.
Advertising adstockAd_t = A_t + λ·Ad_(t−1), half-life = ln 0.5 / ln λλ between 0 and 1; close to 1 means long-lasting advertising.
Durbin-WatsonDW = Σ_(t≥2)(e_t − e_(t−1))² / Σ e_t²Near 2 means no residual autocorrelation; below 1.5 or above 2.5 needs checking and a correction of standard errors.
Factor contributionC_j = mean( ŷ(all factors) ) − mean( ŷ(factor j at base level) )Base level: price 1, promo 0, advertising 0; contributions are computed sequentially, the order affects the split.

Formulas in notation

Log model
ln y_t = β₀ + β₁·ln Traffic_t + β₂·ln P_t + β₃·Promo_t + β₄·Temp_t + β₅·Ad_t + ε_t
β₂ is the price elasticity; β₃ is roughly the percentage promo effect.
OLS
β̂ = (XᵀX)⁻¹ Xᵀ y
Minimizes the sum of squared residuals.
Standard error
SE(β̂_j) = √( s²·[(XᵀX)⁻¹]_{jj} ), s² = Σe² / (n − k)
Divisor n − k.
VIF
VIF_j = 1 / (1 − R²_j)
Above 10 is a collinearity alarm.
Adstock
Ad_t = A_t + λ·Ad_{t−1}
Cumulative advertising effect decaying at λ.

Worked example

Full model coefficients: estimate, standard error, t, 95% interval and the built-in value

FactorEstimateStd. errortLower 95%Upper 95%Built-in
Intercept4.640.4510.43.765.534.51
ln traffic0.860.175.10.521.190.9
ln price−1.740.31−5.7−2.36−1.13−1.7
Promo0.120.061.9−00.240.08
Temperature, °C−0.010−4.2−0.02−0.01−0.01
Advertising (lagged effect)003.6000

104 weeks are generated in code (fixed seed): training 91, hold-out 13. R² = 0.962, advertising λ 0.5. All built-in values fall inside the 95% intervals; the promo interval includes zero because of collinearity with price and advertising. The intercept is shifted by ln 1000 because of the sales scale. The data is illustrative.

Figures

Actual and model by week
Line chart: Actual: 1,025 → 2,106; Model: 1,132 → 2,29605001,0001,5002,0002,50011223344556677889100hold-outActual, 1: 1,025Actual, 104: 2,106Model, 1: 1,132Model, 104: 2,296units per week
  • Actual
  • Model
Data as a table
MeasureActualModel
11,0251,132
21,2411,147
31,1031,070
41,1981,082
51,1661,124
61,0091,127
71,1301,077
81,1251,058
92,2922,112
101,1731,023
111,023965
121,046954
13689859
14933901
15730828
161,4221,425
171,6621,696
18812829
19763751
20825801
21744745
221,0821,203
231,2071,377
241,1281,170
25744731
26704659
271,2021,202
28635626
29631652
301,3441,404
31797697
32616681
33653688
34715658
35700699
36722708
37751693
381,2521,246
39864872
401,7521,676
41972912
42975971
431,9341,680
44990999
45943975
461,0491,094
47984978
481,0071,017
492,1152,188
501,2491,227
511,8341,811
521,0381,164
531,1241,163
542,0262,067
551,0091,113
561,2861,203
572,0741,980
581,1221,137
591,0721,095
601,7481,829
611,6851,764
621,7311,825
631,0471,031
641,019995
65933894
66867881
67869884
68886860
69698789
70805818
71728751
72690699
73654687
74664725
75631642
76690695
77685665
78563601
791,1241,051
80677639
811,1461,187
82719670
83773711
84668681
851,3681,211
86698708
87720741
881,5201,390
891,4571,559
90776778
911,4181,373
92869890
931,4761,509
941,6131,592
951,0021,015
961,0411,026
97914995
98907981
99993981
1002,0361,904
1011,7442,074
1021,2831,244
1031,1981,145
1042,1062,296

Actual and model by week. The model follows the weekly sales pattern; on the hold-out (the last 13 weeks) the error is 5.9% WAPE against 8.2% for the short model. Axis: week number.

Price elasticity estimate in different models
Bar chart: Price only −2.97, Price, promo, weather −1.99, Full model −1.74, Built-in −1.7−3−2−10Price onlyPrice onlyCoefficient on ln price: −2.97−2.97Price, promo, weatherPrice, promo,weatherCoefficient on ln price: −1.99−1.99Full modelFull modelCoefficient on ln price: −1.74−1.74Built-inBuilt-inCoefficient on ln price: −1.7−1.7elasticity
Data as a table
MeasureCoefficient on ln price
Price only−2.97
Price, promo, weather−1.99
Full model−1.74
Built-in−1.7

Price elasticity estimate in different models. Omitting factors biases the estimate: naive -2.97, with promo and weather -1.99, full -1.74 against the built-in -1.7.

Variance inflation factor by regressor
Bar chart: ln traffic 10.8, ln price 13, Promo 14.8, Temperature, °C 10.3, Advertising (lagged effect) 3051015ln trafficln trafficVIF: 10.810.8Alarm threshold: 1010ln priceln priceVIF: 1313Alarm threshold: 1010PromoPromoVIF: 14.814.8Alarm threshold: 1010Temperature, °CTemperature, °CVIF: 10.310.3Alarm threshold: 1010Advertising (lagged effect)Advertising (laggedeffect)VIF: 33Alarm threshold: 1010times
  • VIF
  • Alarm threshold
Data as a table
MeasureVIFAlarm threshold
ln traffic10.810
ln price1310
Promo14.810
Temperature, °C10.310
Advertising (lagged effect)310

Variance inflation factor by regressor. Promo has 14.8 and price 13: they move together, so the coefficients are weakly determined; advertising with accumulation has 3. The threshold of 10 is conventional.

Decomposition of average sales into factor contributions
Waterfall: Base without price, promo and advertising 795, Price (discounts) +102, Promo beyond price +39, Advertising +118, Average weekly sales 1,05302004006008001,0001,200Base without price, promo and advertisingBase without price,promo and…Base without price, promo and advertising: 795795Price (discounts)Price (discounts)Price (discounts): +102+102Promo beyond pricePromo beyond pricePromo beyond price: +39+39AdvertisingAdvertisingAdvertising: +118+118Average weekly salesAverage weekly salesAverage weekly sales: 1,0531,053units per week
  • positive
  • negative
  • total
Data as a table
StepChangeLevel
Base without price, promo and advertising—795
Price (discounts)+102897
Promo beyond price+39936
Advertising+1181,054
Average weekly sales—1,053

Decomposition of average sales into factor contributions. The base without price, promo and advertising is 795 units a week; price, promo and advertising add 259 units together. The split between promo and advertising is approximate because of collinearity.

Residuals against the fit
Scatter plot: 91 points; regression line: y = 0 + 0·x−0.3−0.2−0.1−00.10.266.577.587.03; −0.0997.05; 0.0796.98; 0.036.99; 0.1027.03; 0.0367.03; −0.1116.98; 0.0496.97; 0.0617.66; 0.0826.93; 0.1376.87; 0.0596.86; 0.0926.76; −0.226.8; 0.0356.72; −0.1267.26; −0.0027.44; −0.026.72; −0.026.62; 0.0166.69; 0.0296.61; −0.0017.09; −0.1057.23; −0.1327.07; −0.0376.59; 0.0196.49; 0.0677.09; 06.44; 0.0146.48; −0.0327.25; −0.0446.55; 0.1346.52; −0.16.53; −0.0536.49; 0.0826.55; 0.0026.56; 0.0196.54; 0.087.13; 0.0046.77; −0.0097.42; 0.0446.82; 0.0646.88; 0.0057.43; 0.146.91; −0.016.88; −0.0337; −0.0426.89; 0.0066.93; −0.017.69; −0.0347.11; 0.0187.5; 0.0137.06; −0.1157.06; −0.0347.63; −0.027.02; −0.0987.09; 0.0677.59; 0.0467.04; −0.0137; −0.0217.51; −0.0457.48; −0.0467.51; −0.0536.94; 0.0166.9; 0.0246.8; 0.0436.78; −0.0156.79; −0.0176.76; 0.0296.67; −0.1236.71; −0.0166.62; −0.0326.55; −0.0146.53; −0.0496.59; −0.0886.46; −0.0176.54; −0.0076.5; 0.036.4; −0.0656.96; 0.0666.46; 0.0587.08; −0.0356.51; 0.076.57; 0.0836.52; −0.027.1; 0.1216.56; −0.0146.61; −0.0297.24; 0.0897.35; −0.0686.66; −0.0027.22; 0.033Fitted ln sales↑ Residual
  • points
  • regression line: y = 0 + 0·x
Data as a table
Fitted ln salesResidual
7.03−0.1
7.050.08
6.980.03
6.990.1
7.030.04
7.03−0.11
6.980.05
6.970.06
7.660.08
6.930.14
6.870.06
6.860.09
6.76−0.22
6.80.04
6.72−0.13
7.26−0
7.44−0.02
6.72−0.02
6.620.02
6.690.03
6.61−0
7.09−0.11
7.23−0.13
7.07−0.04
6.590.02
6.490.07
7.090
6.440.01
6.48−0.03
7.25−0.04
6.550.13
6.52−0.1
6.53−0.05
6.490.08
6.550
6.560.02
6.540.08
7.130
6.77−0.01
7.420.04
6.820.06
6.880.01
7.430.14
6.91−0.01
6.88−0.03
7−0.04
6.890.01
6.93−0.01
7.69−0.03
7.110.02
7.50.01
7.06−0.12
7.06−0.03
7.63−0.02
7.02−0.1
7.090.07
7.590.05
7.04−0.01
7−0.02
7.51−0.05
7.48−0.05
7.51−0.05
6.940.02
6.90.02
6.80.04
6.78−0.02
6.79−0.02
6.760.03
6.67−0.12
6.71−0.02
6.62−0.03
6.55−0.01
6.53−0.05
6.59−0.09
6.46−0.02
6.54−0.01
6.50.03
6.4−0.07
6.960.07
6.460.06
7.08−0.04
6.510.07
6.570.08
6.52−0.02
7.10.12
6.56−0.01
6.61−0.03
7.240.09
7.35−0.07
6.66−0
7.220.03

Residuals against the fit. Residuals show no obvious structure in the example: a cloud around zero, the Durbin-Watson statistic is 1.99.

Choosing the advertising lag parameter
Line chart: Model R²: 0.958 → 0.9570.9560.9570.9580.9590.960.9610.96200.10.20.30.40.50.60.70.80.9Model R², 0: 0.958Model R², 0.1: 0.959Model R², 0.2: 0.96Model R², 0.3: 0.961Model R², 0.4: 0.962Model R², 0.5: 0.962Model R², 0.6: 0.962Model R², 0.7: 0.961Model R², 0.8: 0.959Model R², 0.9: 0.957R²
Data as a table
MeasureModel R²
00.958
0.10.959
0.20.96
0.30.961
0.40.962
0.50.962
0.60.962
0.70.961
0.80.959
0.90.957

Choosing the advertising lag parameter. Model R² across λ values: the maximum is at λ = 0.5; at λ = 0 (advertising acts only in the week of exposure) and at λ = 0.9 the model is worse. Axis: decay parameter λ.

Specifics by category

Apparel
Weather and season explain most of the variation; temperature is taken with a one-week lag (buying ahead of the season), price elasticity differs for basics and fashion: a model by group, not for the whole category.
Footwear
Weather switches are sharp (first cold, rain): precipitation and a temperature threshold flag are needed; sizes do not enter the model, which is built by footwear model.
Accessories
Gift weeks and promos give jumps: holiday flags are mandatory; many zero weeks for rare items, so the model is built by group, not by SKU.
Kids
The school season and age groups: “before 1 September” and “after school” flags are significant; price is less elastic for school items and more for fashion.
Men
Weather and promo contribute less and the base is higher: elasticity is lower, coefficients are steadier; a short model of price, promo and traffic is enough.
Women
Color and fashion waves, fast range turnover: price and promo have higher elasticity, coefficients change from season to season; the model is recalculated every season.

Common mistakes

  • A regression of sales on price without season and promo → elasticity biased several-fold → add factors or use log-log with controls.
  • Dozens of factors on a year of data → the model memorizes noise → no more than one factor per 10-15 observations and a hold-out window.
  • Each coefficient is read separately at VIF above 10 → false conclusions that advertising “does not work” → merge factors or check by experiment.
  • The advertising lag is ignored → the effect is credited to the next week or promo → add adstock and pick λ.
  • Regression is taken for causation and the budget is raised without a test → returns fall outside the historical range → a check experiment before scaling up.

Russian specifics

  • Retailer: traffic and receipt data are tied to customers only in anonymized form; a weekly sales model needs no person identifiers, while a loyalty program and cards require consent and a legal basis. Rule: Law 152-FZ of 27.07.2006: Federal Law of 27.07.2006 No. 152-FZ on personal data (rule check not completed).
  • Brand: model results are not used to coordinate prices with competitors; price information exchange is limited by competition protection requirements.

Open interactively →