SAS Data Science

Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Viya (Machine Learning), SAS Visual Text Analytics, with point-and-click interfaces or programming
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sasgyro
Fluorite | Level 6

I have a series of patients who have certain characteristics( variables)

I need to pick out the patients that meet the criteria by using their patient ID (300 unique identifiers) and separate them into their own dataset so they are alike only by that one characteristic.

 

i=I want it to be like this:

 

 Data want;
SET have;
where patientnum= 3 6 5 4 8 7 9 0 ;
run;

but this doesn't work. and using OR and AND statements cancels the previous ID number 

 

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20
 Data want;
SET have;
where patientnum in (3 6 5 4 8 7 9 0) ;
run;
/*or*/

where patientnum in (3, 6, 5, 4, 8, 7, 9, 0) ;

 

View solution in original post

1 REPLY 1
novinosrin
Tourmaline | Level 20
 Data want;
SET have;
where patientnum in (3 6 5 4 8 7 9 0) ;
run;
/*or*/

where patientnum in (3, 6, 5, 4, 8, 7, 9, 0) ;

 

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1048 views
  • 3 likes
  • 2 in conversation