Greetings,
I have a data set, in which companies pay dividends in different months in different years. I'd like to create a sequence of quarter dividend for 18 years.
I plan to group the dividend in different months into quarter dividend first, then create quarter dividend sequencing for different years next. Will there be any different and better way to do it? And would you kindly help me on the SAS procedures and programming please?
Thank you.
Best regards,
Tilda N.
You could go for something like:
proc sql;
create table want as
select
intnx("qtr", divDate, 0) as divQtr format=yyq.,
sum((divAmount) as qtrDivAmount
from have
group by calculated divQtr;
quit;
where divDate is a SAS date.
I think you want to aggregate dividends for all companies, by quarter, correct? If so, what are your date variables? I.e., are they sas date values? Or possibly year and month variables? Could you show a sample of what your sas data set currently contains?
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 the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.