Hello,
What is the best way to create custom frequency bins?
Hello,
I have not looked into MLFs. I am still quite new to SAS.
Mark
I haven't a clue what role the date plays in this.
Can you provide something with the counts done manually from the example data?
Keep it simple:
data counts;
do n = 1 by 1 until(last.count);
set have;
by count notsorted;
end;
if count = 5 then do;
do bin = 1 to 141 by 10;
if n >= bin then output;
end;
end;
keep n bin;
run;
proc sql;
create table want as
select
bin,
count(n) as nbSequences,
sum(n) as nb5Counts
from counts
group by bin;
quit;
proc print data=want noobs; run;
nb bin Sequences nb5Counts 1 5 155 11 2 135 21 2 135 31 2 135 41 2 135 51 2 135 61 1 81 71 1 81 81 1 81
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.