BookmarkSubscribeRSS Feed
fred_major
Calcite | Level 5


Hi,

I am performing the Proc Means using dates Aug 1 - Oct 20 and getting results below.

Now I am concern because during that date range we have 3 holidays all falling on a Monday, is it possible to  apply weighting for holidays?

proc MEANS NOPRINT data=Temp2;

class day ;

var count ;

output out=Results_Mean  mean= MEAN min=MIN max=MAX median = median std= STD var = Variance uclm=UCL LCLM=LCL;

run;

daymeanMinMaxmedianUCLLCL
Friday15363.0914520.7516941.0815125.0415835.1814891.01
Monday15599.479884.3518428.4316710.2717539.1713659.77
Sunday5177.314678.885627.835180.035378.744975.88
Tuesday15741.511509317173.315478.7816231.3615251.66
Saturday7365.936257.158060.957559.727688.337043.53
Thursday15488.7214891.916958.315222.3915934.3415043.09
Wednesday15825.4414951.6317371.2215489.816405.8515245.03
3 REPLIES 3
art297
Opal | Level 21

Are they holidays that are identified by the holiday() function and, by weighting, would just excluding them using a where data set option suffice?

Reeza
Super User

Depends on how you want to deal with them. Another option would be to classify holidays as a day of the week on its own, but it depends on what type of questions you're looking at.

I'd start off with holidays as its own day of week as below:

daymeanMinMaxmedianUCLLCL
Friday15363.0914520.7516941.0815125.0415835.1814891.01
Monday15599.479884.3518428.4316710.2717539.1713659.77
Sunday5177.314678.885627.835180.035378.744975.88
Tuesday15741.511509317173.315478.7816231.3615251.66
Saturday7365.936257.158060.957559.727688.337043.53
Thursday15488.7214891.916958.315222.3915934.3415043.09
Wednesday15825.4414951.6317371.2215489.816405.8515245.03

HOLIDAY       xxxxxxxxx                          ....                                        xxxxxxxxxx

fred_major
Calcite | Level 5

Thank you Reeza & Arthur,

Reeza I found that your suggestion  did exactly what I was looking for, thanks.

Fred

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1394 views
  • 0 likes
  • 3 in conversation