BookmarkSubscribeRSS Feed
robertrao
Quartz | Level 8

Hi Sorry about that..

The code which you posted works exactly fine...

Secondly, I was trying to run it by replacing

delivery_premature = (. < labor < 37);  with what you explained.......

if (. < delivery < 37) then delivery_premature = 1;

     else delivery_premature = 2;      /*did u put this 2 here by mistake........i think it should be 0 because the format has only 1 and 0 and no 2*/

Please correct me

AncaTilea
Pyrite | Level 9

Yes, you are correct it should be 0 (to allow for my format definition to work), or if you prefer to be 2, then you change

proc format;

value yesno 1 = "Premature" 2 = "Not premature"

;

quit;

Either 2 or 0, whatever you prefer.

Smiley Happy

Good.

Now, do you have your data set working?

robertrao
Quartz | Level 8

Thanks for your time and reply.

I am not working on this.This was posted originally by another person. I am learning SAS and techniques involved....

Thanks

AncaTilea
Pyrite | Level 9

Right Smiley Happy:smileylaugh:

Ok, good day!

robertrao
Quartz | Level 8

Also shouldnt the highlighted "DELIVERY " be replaced by LABOR

Secondly, I was trying to run it by replacing

delivery_premature = (. < labor < 37);  with what you explained.......

if (. < delivery < 37) then delivery_premature = 1;

     else delivery_premature = 2;      /*did u put this 2 here by mistake........i think it should be 0 because the format has only 1 and 0 and no 2*/

Please correct me

AncaTilea
Pyrite | Level 9

yes, correct.

I got the variables mixed up.

Smiley Happy

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 20 replies
  • 3150 views
  • 0 likes
  • 4 in conversation