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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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