BookmarkSubscribeRSS Feed
sandrube
Fluorite | Level 6

Hello,

I have 'data1' which is the original data. 'data3' is the output which I would like to have.

 

In data1 I would like to split CRI and mets.

CRI to CRI_1, CRI_2, CRI_3, CRI_4, CRI_5 and CRI_other
If CRI has 1, CRI_1 will be 1, else 0


Similarly, I want to split mets into mets_0001 mets_brain mets_lymph_node mets_lung
If mets is no, No, or ‘’ then mets_0001=0, else 1
If you look at mets, we have brain, lymph node, lung
So, if mets has brain in it, then mets_brain=1, else 0

 

data1 and data3 are attached.

 

Thank you so much!

2 REPLIES 2
Tom
Super User Tom
Super User

Can you show what you tried?  Also can you just post simple example input/output datasets as data step code instead of as binary dataset files?

 

It is not clear what is your grouping variable. Or how you are assigning values of CRI to a specific one of the many new varaibles.  Are you just doing it by the order they appear? Or is there some additional variable with values like 1,2,3,4 that tell which target variable name to use?

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 780 views
  • 0 likes
  • 3 in conversation