Date: Fri, 24 Jun 2005 20:58:06 +0200 Reply-To: Pierre Gaudebout Sender: "SAS(r) Discussion" From: Pierre Gaudebout Subject: comparison with weighted percentages (again) Content-Type: text/plain; charset=ISO-8859-1 Hi, I return my message because it seems that he arrived truncated... "I wish to compare the answers to questions of satisfaction of patients coming from various hospitals. The various hospitals do not have the same weight. The comparison must be done between a hospital and the others. My idea is as follows: For each hospital, I can know the percentages of satisfied patients and I know the weight of each hospital. For example, the weights are : Hospital 1: w1 hospital 2: w2 hospital 3: W3 hospital 4: w4 hospital 5: w5... (actually, the hospitals are in greater number) If I wish to compare hospital 1 with the others, I use the weights modified as follows: b2 = w2/(1-w1) b3 = w3/(1-w1) b4 = w4/(1-w1) b5 = w5/(1-w1) and if Pi is the percentage of satisfied patients for hospital I, I definite weighted percentages for the group of hospital (H2 H3 H4 and H5) in this way: Pw(-1) = (b2*P2 + b3*P3 + b4*P4 + b5*P5) The test of comparison rests on the statistic : |P1 - Pw(-1)|/SQRT(var P1 + var Pw(- 1)). My file contents only the next data (that is an example): obs hosp weight question 1 1 0,1 1 2 1 0,1 1 3 1 0,1 1 4 1 0,1 0 5 1 0,1 0 .............................. 13 2 0,05 1 14 2 0,05 1 15 2 0,05 1 16 2 0,05 1 17 2 0,05 1 18 2 0,05 1 19 2 0,05 1 20 2 0,05 0 .............................. 33 3 0,25 1 34 3 0,25 0 35 3 0,25 1 36 4 0,35 0 37 4 0,35 1 38 4 0,35 0 39 4 0,35 0 ......................... 49 5 0,25 1 50 5 0,25 1 51 5 0,25 1 52 5 0,25 0 Could anyone help me for write this program ? Thank you" Pierre Gaudebout

Back to: Top of message | Previous page | Main SAS-L page