BookmarkSubscribeRSS Feed
lizzy28
Quartz | Level 8

Hi SAS forecasting experts,

This time I came across the problem of using weekly data in a VAR model for forecasting. I have two-year weekly sales and marketing campaign data (RAQ) and want to use VAR to run forecast. However, the sales always have spikes at the end of month. As the data is weekly, the end of month can be the fourth week of a month or (the beginning of) the fifth week. So, my question is: how to do such month-month seasonal adjustment using weekly data in order to use the seasonally adjusted data in the VAR model?

The sample data is attached. Both the sales and the campaign activities are in logarithm form.

Thank you!

weekyearlsaleslcampaign
020139.51162910.94447
120139.7307411.19503
220139.82032311.26294
320139.88837411.30585
4201310.0216711.24355
520139.69977911.14156
620139.98575911.21244
7201310.1434511.28749
8201310.3599311.2146
920139.78981511.09255
1020139.9851611.09909
11201310.0565111.18147
12201310.3694511.18582
1320139.87863111.0726
1420139.97170711.05936
15201310.057511.08756
16201310.2023311.14399
17201310.1462411.02723
1820139.87904110.97432
19201310.0040611.02241
20201310.2585711.1648
21201310.4295511.14669
2220139.92353511.04971
23201310.0432911.06462
24201310.1332111.11524
25201310.3903511.20462
26201310.0561711.14541
27201310.0621611.11842
28201310.0816811.21829
29201310.1934711.32347
30201310.250911.29164
31201310.02111.26334
32201310.0486311.25205
33201310.1241511.26457
34201310.4289911.28143
3520139.97287411.12966
3620139.81175611.10172
3720139.86422711.10297
38201310.017411.06164
3920139.92127811.02241
4020139.7956811.00686
4120139.94025311.05972
42201310.0559511.11215
43201310.1113111.04937
4420139.60339510.9504
4520139.72352311.00896
4620139.86391511.05559
47201310.2081411.08708
4820139.72160610.91369
4920139.66978810.92228
5020139.87313110.93519
5120139.99081111.00627
5220139.65136610.49255
020149.38143210.50381
120149.39216211.03046
220149.71317411.07163
320149.80934211.12891
420149.98695511.10241
520149.48850211.0561
620149.83322611.19188
7201410.1657411.24522
8201410.430411.23107
920149.70935711.12648
1020149.9881511.13966
11201410.0763111.19915
12201410.2184111.26174
13201410.0900511.09156
1420149.98257611.03743
15201410.0595911.12678
16201410.1447111.16423
17201410.237611.08667
1820149.96114311.03373
19201410.0565111.13076
20201410.1732911.17912
21201410.377211.13428
2220149.94659511.02451
23201410.0186411.04596
24201410.0944811.07414
25201410.2721511.15696
26201410.2136511.11531
27201410.1938811.16723
28201410.0899711.1838
29201410.0565111.17566
30201410.1909611.1527
3120149.79545711.072
3220149.92176911.09712
33201410.0778611.21036
34201410.4108511.3168
35201410.0519911.20929
3620149.90383711.1398
3720149.96571111.15681
38201410.0923711.18805
39201410.0793311.15161
4020149.76663611.13017
4120149.8569211.15869
4220149.90673211.16284
43201410.1690811.17224
4420149.64036811.14215
4520149.80587511.21039
4620149.87075811.32554
47201410.1257911.27662
4820149.8627711.19193
4920149.84426811.13488
50201410.0637311.17643
51201410.0764311.15661
52201410.111810.81565
1 REPLY 1
alexchien
Pyrite | Level 9
You can consider creating a dummy variable to capture the end-of-month effect. Since you are using the log scale of the dependent variables, the dummy variable will basically provide the multiplicative lift of the base.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1058 views
  • 0 likes
  • 2 in conversation