BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Reeza
Super User

You can have two conditions in your IF statements. 

 

if sex=0 and wbc >= 370 and wbc <= 500 then wbc_category=0; 
else wbc_category=1;

 

Note that I've formatted your code in your original question. In the future please take the time to do so yourself, and it helps if you only include code relevant to the problem at hand. If you're using SAS EG, highlight your code and press CTRL+I to have it formatted. In SAS studio, use the second from last icon in the ribbon. Formatting your code for legibility makes it easier to find errors and to debug.

 

 

Additionally, please note that everyone on here is a volunteer and respectful and polite responses are appreciated. Statements like the one below are not helpful. 

 

you did not answer my question?
how to implement eg 2 !!!
RBC?
that however is sas fault there are few online guides !!

 

 

There are a ton of SAS 'online guides' out there if you search. 

For starters, the first programming course (online version) is free and would cover the topic in your question. 

Additionally, here are some other resources you can use in the future to help you learn. 

 

https://support.sas.com/edu/schedules.html?ctry=us&crs=PROG1

http://video.sas.com/#category/videos/how-to-tutorials

Lexjansen.com -> use this if you have a specific topic you'd like help with. This are user written papers so the quality can vary.

https://stats.idre.ucla.edu/sas/modules/

 

The first Statistics e-course is also free.

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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