BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SBuc
Obsidian | Level 7

Dear community,

I am looking for printing all the different combinations of a clinical signs scoring system.

I have six clinical signs (b1,..,b6) which are either normal abnormal (0,1)

I want to print all the 2^6 (64) possible clinical signs association.

I am relatively new with IML of SAS and did not arrive to do it.

please let me know if you have any clue!

I really appreciate

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

The simplest way is

proc iml;
allComb = ExpandGrid(0:1, 0:1, 0:1,
                     0:1, 0:1, 0:1 ); 
print allComb;

This solution hard-codes six arguments, If the 'number of clinical signs' might change from study to study,  you can use one of the other techniques in the article "Creating a matrix with all combinations of zeros and ones."

View solution in original post

3 REPLIES 3
Rick_SAS
SAS Super FREQ

The simplest way is

proc iml;
allComb = ExpandGrid(0:1, 0:1, 0:1,
                     0:1, 0:1, 0:1 ); 
print allComb;

This solution hard-codes six arguments, If the 'number of clinical signs' might change from study to study,  you can use one of the other techniques in the article "Creating a matrix with all combinations of zeros and ones."

SBuc
Obsidian | Level 7

Thank you so much!

you solved my problem!

WarrenKuhfeld
Rhodochrosite | Level 12

Since you are asking for a full-factorial design, you can instead use the MktEx macro.  It also makes fractional factorial designs, orthogonal arrays, and nonorthogonal designs, all using the same syntax.  You can add the option 'noqc' after 'render' if you do not have the SAS/QC product.  For your particular problem, you could also use PROC PLAN.

 

%mktex(2 ** 6, n=64, levels=0, options=render)

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Multiple Linear Regression in SAS

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.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 3 replies
  • 823 views
  • 2 likes
  • 3 in conversation