Hi @Ksharp,
Thanks for rejoining the discussion. As far as I've understood, it's just about assigning observations (8 in the example, but presumably many more in reality) to 4 time slots (Week1, Week2, Week3, Week4). One variable (labelled "Total Samples" in the example) contains a number (the sum of ScoreA, ScoreB, etc.). The optimality criterion for the assignment is to achieve as similar totals of those numbers in the four time slots as possible. A precise definition of the criterion is pending. In the example the totals for Week1 - Week4 are 180, 170, 210 and 110, respectively.
So this question is the same as :
https://communities.sas.com/t5/General-SAS-Programming/Creating-Groups-of-Equal-Size/td-p/268862
Yes, very similar to that one. Here, we have only a single variable, not three, with values to be summed within the groups. So, we might be very close to a solution already (requiring either SAS/OR or SAS/IML, though).
I can do that by IML . But OP should post another question at OR forum.
RobPratt is there . He could give some OR code .
Unfortunately, they don't have a SAS/OR license. Not sure about a SAS/IML license (answer to question 4 is pending). I know that IML is included in SAS UE, but only for learning purposes, I guess.
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 use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.