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
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;
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.