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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 2062 views
  • 0 likes
  • 4 in conversation