Forecasting using SAS Forecast Server, SAS/ETS, and more

PROC X12 for seasonal adjustment

Occasional Contributor
Posts: 10

PROC X12 for seasonal adjustment

I'm trying to use proc x12 to adjust seasonality. I use the following code. My data is quarterly. 


proc x12 data=HAVE date=yyqq interval=4 noprint;
by company_id;
var assets;
x11 mode=add outforecast;
output out=WANT;


There is error showing "Time ID variable DATADATE contains gaps." This is because some of my observations ended the third quarter of the year instead of the fourth quarter of the year. Is there any way to fix this??


Also, those firms with adjusted assets results have the exact same values of adjusted assets with unadjusted assets. Is this because none of the firm in my data has seasonality pattern in terms of assets OR there is some mistake in my coding? Please help.

SAS Employee
Posts: 38

Re: PROC X12 for seasonal adjustment

Posted in reply to OceanDream

You can use PROC TIMESERIES to covert your data into a proper time series with no gaps in the dates. 


For example, this will set to 0 the values of all numerical variables for the dates for which there are no observations. You can look at the SETMISS= option in the manual to see other options. 


 proc timeseries data=have out=mseries;
      by company_id;
      id yyqq interval=quarter
      var _numeric_;
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation