DATA Step, Macro, Functions and more

Proc X12 - seasonal adjustment

Reply
Contributor
Posts: 62

Proc X12 - seasonal adjustment

I have a data in such format:

 

Date total_nr

 

Jan2010  15

Feb2010 25

Mar2010 30

....

 

And I want to do seasonal adjustment and just to draw graph with raw data+seasonal adjusted.

 

However, When my total_nr is less than 100, i have some issues with data variable: "Unable to detremine the interval of Time ID variable" or "Time ID variable contains gaps".

 

all my data have all months and there is no missing data. everything works when total_nr value is bigger.

 

Can someone help or explain what is wrong?

 

Thank you 

Frequent Contributor
Posts: 129

Re: Proc X12 - seasonal adjustment

For which records are you producing errors?

Are you trying to create a date with invalid values like 30FEB2010 or something?

 

Do you have some sample code please?

________________________

- Cheers -

Contributor
Posts: 62

Re: Proc X12 - seasonal adjustment

My date variable is in this format monyy7. and the outcome in total_nr represent number or admissions per month.

 

the code i used is this:

 

proc x12 data=adm date=date;

var total_nr;

x11;

output out=adm_seas a1 d10 d11 d12 d13;

run;

 

when i just plot original series vs seasonal adjusted (this is what i want)

 

proc sgplot data=adm_seas;

series x=date y=total_nr_a1;

series x=date y=total_nr_d11;

run;

 

However, then i have small numbers of admissions per month (around 40 to 100 per month), proc x12 does not run.

Frequent Contributor
Posts: 129

Re: Proc X12 - seasonal adjustment

Hi Viollete,

 

This could be data driven, if you have a large increase of seasonal factors from year to year, check this "identifiable seasonality"

Contact the SAS support, they may be able to confirm why SAS is not running the adjustment when var<100. Unfortunately I can not test by myself.

________________________

- Cheers -

Ask a Question
Discussion stats
  • 3 replies
  • 307 views
  • 0 likes
  • 2 in conversation