0

I have a panel dataset with weekly observations of multiple locations. I'm trying to decompose to get the seasonal and trend dependent values. I have 3 years of these weekly values, but the output dataset only has the seasonal and trend observations for year 2. SO year 1 is all blank, which I guess I could understand because maybe SAS uses that to create the trend, year 2 has values, but then year 3 is blank as well. What am I doing wrong? Code is below:

proc timeseries data=sorted_site
outtrend=trend_site
outseason=season_site
outdecomp=decomp_site
;
by site_id;
decomp orig tc sic /mode=add;
id week_end interval=week accumulate=avg;
var svc_rate;
run;
jswtraveler
  • 345
  • 6
  • 19
  • I recreated your scenario using sashelp.pricedata, but could not find a problem. Can you post an example of your data? – Stu Sztukowski Jul 22 '16 at 14:25
  • 1
    I figured it out. It's the underlying math, it requires taking n observations from the overall time series. Thank you – jswtraveler Jul 22 '16 at 19:43

0 Answers0