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;
day | mean | Min | Max | median | UCL | LCL |
Friday | 15363.09 | 14520.75 | 16941.08 | 15125.04 | 15835.18 | 14891.01 |
Monday | 15599.47 | 9884.35 | 18428.43 | 16710.27 | 17539.17 | 13659.77 |
Sunday | 5177.31 | 4678.88 | 5627.83 | 5180.03 | 5378.74 | 4975.88 |
Tuesday | 15741.51 | 15093 | 17173.3 | 15478.78 | 16231.36 | 15251.66 |
Saturday | 7365.93 | 6257.15 | 8060.95 | 7559.72 | 7688.33 | 7043.53 |
Thursday | 15488.72 | 14891.9 | 16958.3 | 15222.39 | 15934.34 | 15043.09 |
Wednesday | 15825.44 | 14951.63 | 17371.22 | 15489.8 | 16405.85 | 15245.03 |
Are they holidays that are identified by the holiday() function and, by weighting, would just excluding them using a where data set option suffice?
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:
day | mean | Min | Max | median | UCL | LCL |
Friday | 15363.09 | 14520.75 | 16941.08 | 15125.04 | 15835.18 | 14891.01 |
Monday | 15599.47 | 9884.35 | 18428.43 | 16710.27 | 17539.17 | 13659.77 |
Sunday | 5177.31 | 4678.88 | 5627.83 | 5180.03 | 5378.74 | 4975.88 |
Tuesday | 15741.51 | 15093 | 17173.3 | 15478.78 | 16231.36 | 15251.66 |
Saturday | 7365.93 | 6257.15 | 8060.95 | 7559.72 | 7688.33 | 7043.53 |
Thursday | 15488.72 | 14891.9 | 16958.3 | 15222.39 | 15934.34 | 15043.09 |
Wednesday | 15825.44 | 14951.63 | 17371.22 | 15489.8 | 16405.85 | 15245.03 |
HOLIDAY xxxxxxxxx .... xxxxxxxxxx
Thank you Reeza & Arthur,
Reeza I found that your suggestion did exactly what I was looking for, thanks.
Fred
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.