1
$\begingroup$

I'm new to forecasting and trying to create a model to forecast one step ahead weekly sales from my company. The variables I've identified for the model are Lag 1 Markdown spend and lag 1 sales, and I've included dummy variables for monthly seasonality and some promotional weekends we run, resulting in the below model:

> summary(fit)

Call:
lm(formula = Sales.RtlT ~ L1.MD + P1 + P2 + P3 + P4 + P5 + P6 + 
    P7 + P8 + P9 + P10 + P11 + L1.Sales, data = lux)

Residuals:
 Min       1Q   Median       3Q      Max 
-10.7028  -2.8850  -0.2948   2.5488  15.3845 

Coefficients:
        Estimate Std. Error t value Pr(>|t|)    
(Intercept)  5.17443    1.86670   2.772 0.006115 ** 
L1.MD        0.16591    0.02353   7.050 3.06e-11 ***
P1           0.21394    1.84689   0.116 0.907902    
P2           0.47421    1.83599   0.258 0.796462    
P3          -1.16762    1.75653  -0.665 0.507013    
P4          -0.77594    1.84712  -0.420 0.674892    
P5           3.36375    1.76142   1.910 0.057650 .  
P6          -1.11759    1.56631  -0.714 0.476384    
P7           1.76297    1.79197   0.984 0.326429    
P8           5.13988    1.66437   3.088 0.002309 ** 
P9           5.39127    1.52419   3.537 0.000506 ***
P10          6.58703    1.61126   4.088 6.37e-05 ***
P11          7.02233    1.60600   4.373 2.00e-05 ***
L1.Sales     0.63513    0.04829  13.152  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 4.795 on 194 degrees of freedom
Multiple R-squared:  0.8115,    Adjusted R-squared:  0.7988 
F-statistic: 64.23 on 13 and 194 DF,  p-value: < 2.2e-16

my weekly sales data isn't stationary, but if I difference it once it is, as shown below:

enter image description here

enter image description here

However I can't fit lm with the differenced values. Is it preferable to have a stationary time series for a forecast like this, and if so how should I run the regression to account for this?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.