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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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