BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
robertrao
Quartz | Level 8


Hi,

I have 11 Questions for Timely and effective care from Different hospitals

Question   HOSPITAL     N          Percent    Estimated_Outcome( which is N*Percent)     

1                AAA             720           0.96         691

2                AAA

3                AAA

4                AAA

5               AAA

6               AAA

7              AAA

8              AAA

9             AAA

10           AAA

11          AAA               414        0.98       405.72   

1            BBB               389        0.97        377.33   

2            BBB

3            BBB

4            BBB

5            BBB

6            BBB

7            BBB

8             BBB

9             BBB

10           BBB

11           BBB                107        0.93       99.51

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Something like this ?

proc transpose data=have out=haveT prefix=Q_;

by hospital category;

var percent;

id question;

run;

proc rank

     data=haveT(where=(category in ("OURS", "REGIONAL")))

     out=wantRegional(where=(category="OURS"))

     percent;

var Q_1-Q_11;

ranks R_1-R_11;

run;

proc rank

      data=haveT(where=(category in ("OURS", "NATIONAL")))

      out=wantNational(where=(category="OURS"))

      percent;

var Q_1-Q_11;

ranks R_1-R_11;

run;

PG

PG

View solution in original post

1 REPLY 1
PGStats
Opal | Level 21

Something like this ?

proc transpose data=have out=haveT prefix=Q_;

by hospital category;

var percent;

id question;

run;

proc rank

     data=haveT(where=(category in ("OURS", "REGIONAL")))

     out=wantRegional(where=(category="OURS"))

     percent;

var Q_1-Q_11;

ranks R_1-R_11;

run;

proc rank

      data=haveT(where=(category in ("OURS", "NATIONAL")))

      out=wantNational(where=(category="OURS"))

      percent;

var Q_1-Q_11;

ranks R_1-R_11;

run;

PG

PG

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!

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
  • 1 reply
  • 660 views
  • 0 likes
  • 2 in conversation