BookmarkSubscribeRSS Feed
Elisabeth1
Calcite | Level 5

Hi,

I am using the SAS studio forecasting procedures which generate the following code to test for White Noise.

I am using a series spanning from 2000-2019 with daily data; HOWEVER the data that I am using is reported only 5 days a week (Monday-Friday); the code generated is below and shows "seasonality=7* (i.e. 7 days of the week).

I have tried to just adjust it to "seasonality=5" however, this does not seem to yield the right results.

How should the code be adjusted to account for only 5 days a week.

 

ods noproctitle;
ods graphics / imagemap=on;

proc sort data=PG2.DATASET_2000_2019 out=Work.preProcessedData;
by date;
run;

proc timeseries data=Work.preProcessedData seasonality=7 plots=(series corr acf
wn);
id date interval=day;
var Spread / accumulate=none transform=none dif=0 sdif=0;
ods exclude ACFNORMPlot;
ods exclude WhiteNoiseProbabilityPlot;
run;

proc delete data=Work.preProcessedData;
run;

3 REPLIES 3
novinosrin
Tourmaline | Level 20

Hi @Elisabeth1  Can the interval be shifted by 2 days?

 

For example: id date interval=week.2;

 

Disclaimer: I am only taking a guess 

 

mkeintz
PROC Star

You have a statement:

   ID DATE  INTERVAL=DAY;

 

Is there a "weekday" interval in proc timeseries?  Then you might try:

   ID DATE INTERVAL=WEEKDAY;

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
PGStats
Opal | Level 21

According to the documentation of SAS time series procedures, what @mkeintz suggested should work:

 

https://documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_tsdata_sect030.htm&docsetVersion=14... 

PG

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 733 views
  • 1 like
  • 4 in conversation