BookmarkSubscribeRSS Feed
Astounding
PROC Star

Prakash,

Just in case I'm still misinterpeting the problem, here's an approach that uses your original data set as input.  It creates an observation for each 72C3 combination that have all 3 items equal to 1.

data _72C3_ (keep=_72C3_);

   set original;

   array items {72} item_1 - item_72;

   do i = 1 to 70;

      do j = i+1 to 71;

         do k = j + 1 to 72;

             if items{i} = items{j} = items{k} = 1 then do;

                _72C3_ = put(i, z2.) || ' ' || put(j, z2.) || ' ' || put(k, z2.);

                output;

            end;

         end;

      end;

   end;

run;

Then get counts for each value of _72C3_.

Good luck.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 15 replies
  • 4329 views
  • 1 like
  • 5 in conversation