BookmarkSubscribeRSS Feed
dkanand86
Calcite | Level 5

Hi,

Please can someone explain with a simple dataset merge and proc sql example the difference between following scenarios:

1. if a

2. if b

3. if a and not b

4. if not a and b

Thanks


2 REPLIES 2
Astounding
PROC Star

These are simple logical conditions, whether it's a DATA step, SQL, or a treatise by Aristotle.

Assuming that "a" and "b" can be either true or false:

if a ==> true whenever "a" is true, regardless of the value of "b"

if b ==> true whenever "b" is true, regardless of the value of "a"

if a and not b ==> true whenever "a" is true and "b" is false

if not a and b ==> true whenever "a" is false and "b" is true

In SAS programming, if "a" and "b" represent numeric amounts rather than comparisons, SAS considers 0 and missing to be false and any other value to be true.

Good luck.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 2 replies
  • 12072 views
  • 0 likes
  • 3 in conversation