hers the data
if you could take look
im here to try and figure this out!
Hierarchy is Region and State
Dependent is total sales
time is order date by week
The problem with your data is the high number of missing values in your data when you aggregate it at the weekly level. For example, the followings are the most problematic series (the number in parentheses are missing values out of series with 209 observations):
West : Wyoming (208)
Central : North Dakota (207)
East : West Virginia (207)
East : Maine (206)
East : District of Co (205)
Central : South Dakota (204)
East : Vermont (203)
West : Montana (201)
Note: I used the following code to aggregate data at weekly level:
proc import datafile = '~\ctg_retail_demo.xlsx'
out = retail_data replace;
run;
proc sort data = retail_data out = retail_data_sorted;
by state region Order_Date;
run;
proc timedata data = retail_data_sorted out = out;
id Order_Date interval = week;
var Total_Sales / ACCUMULATE=TOTAL;
by state region;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.