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

help with proc expand

Reply
Super Contributor
Posts: 395

help with proc expand

I need help from some proc expand experts

I have data that has date and units by quarter.. I want it to expand it by month but when the total for the year (by 12 months)  is added up it remains the same as the 4 quarters.

have

2000.Q1  33

2000.Q2  22

2000.Q3  50

2000.Q4  10

want

2000.01 11

2000.02 10

2000.03 12

2000.04   2

2000.05   5

2000.06  15

and so on...

so in the 'want' the sum for the 2000.01 & 2000.02 & 2000.03 remain 33 as per before.

Thanks

Respected Advisor
Posts: 3,777

Re: help with proc expand

Maybe,

data test;

   input date:yyq. y;

   format date yyq.;

   cards;

2000Q1  33

2000Q2  22

2000Q3  50

2000Q4  10

;;;;

   run;

proc print;

proc expand to=month extrapolate method=step;

   id date;

   convert y / tout=(/3);

   run;

proc print;

   run;

PROC Star
Posts: 7,356

help with proc expand

This post was just shown as a new post even though it is a month old.  Surely someone must have asked the obvious questions: (1) does it HAVE to be done with proc Expand? and (2) what determines the proportion of the split for each month?

If you only need quarter expanded to month, and the percents to be equally split between the three months, and it can be accomplished in a datastep, the task is trivial.

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