BookmarkSubscribeRSS Feed
plf515
Lapis Lazuli | Level 10

I am running this sort of code (the data set is proprietary, so I can't give it)

 

title "Time series output to make graphs of seasonally adjusted";

proc timeseries data = cohort outdecomp = upg;

  id event_mth interval=month;

  decomp orig tcc sc ic sa/mode=mult;

  var upg;

  where cohort = "&date"d;

run;

 

For some cohorts and some event_mth , SA and other decomposition variables are missing.  Why could this happen?

 

Thanks!

 

Peter

1 REPLY 1
udo_sas
SAS Employee

Hello -

On behalf of Technical Support:

 

"The reason why the Seasonal Component and the Seasonally-Adjusted series are missing could be releated to no non-missing Seasonal-Irregular component (SIC) values associated in your data. The Seasonal Component is computed as the average of the SIC for a given seasonal period. (Details on the computation of each of the components can be found here: http://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_timeseries_det...)"

 

Technical Support has also created an example to illustrate this point further:

 

data test;

  set sashelp.air(where=('01dec1958'd <= date <='01oct1960'd));

run;

 

proc timeseries data = test outdecomp = out;

  id date interval=month;

  decomp orig tcc sic sc ic sa/mode=mult;

  var air;

run;

 

proc expand data=test out=expandout method=none;

  id date;

   convert air=tc / transformout=( cd_tc 12 );

   convert air=my_tc / transformout=(cmovave 12 movave 2 trim 6);

   convert air=s  / transformout=( cd_s  12 );

   convert air=i  / transformout=( cd_i  12 );

   convert air=sa / transformout=( cd_sa 12 );

run;

 

proc print data=out;

run;

 

proc print data=expandout;

run;

 

Thanks,

Udo

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!

Multiple Linear Regression in SAS

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.

Discussion stats
  • 1 reply
  • 824 views
  • 0 likes
  • 2 in conversation