Getting Started Example 12 for PROC RELIABILITY
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: RELGS12 */
/* TITLE: Getting Started Example 12 for PROC RELIABILITY */
/* PRODUCT: QC */
/* SYSTEM: ALL */
/* KEYS: reliability, lifetime data */
/* PROCS: RELIABILITY */
/* DATA: */
/* */
/* SUPPORT: sasgjj */
/* REF: PROC RELIABILITY, INTRODUCTORY EXAMPLE 12. */
/* MISC: */
/****************************************************************/
/* ID Time Num */
/* num = -0 : censoring time */
/* num = 1 : event time */
data bladder;
label Group = 'Treatment';
label Age = 'Age( Months )';
length Group $ 10;
input id$ Age num;
if id <= 48 then Group = 'Placebo';
else Group = 'Thiotepa';
if Group = 'Placebo' then nn=48;
else nn=38;
datalines;
1 0 -1
2 1 -1
3 4 -1
4 7 -1
5 10 -1
6 6 1
6 10 -1
7 14 -1
8 18 -1
9 5 1
9 18 -1
10 12 1
10 16 1
10 18 -1
11 23 -1
12 10 1
12 15 1
12 23 -1
13 3 1
13 16 1
13 23 1
13 23 -1
14 3 1
14 9 1
14 21 1
14 23 -1
15 7 1
15 10 1
15 16 1
15 24 1
15 24 -1
16 3 1
16 15 1
16 25 1
16 25 -1
17 26 -1
18 1 1
18 26 -1
19 2 1
19 26 1
19 26 -1
20 25 1
20 28 -1
21 29 -1
22 29 -1
23 29 -1
24 28 1
24 30 1
24 30 -1
25 2 1
25 17 1
25 22 1
25 30 -1
26 3 1
26 6 1
26 8 1
26 12 1
26 26 1
26 30 -1
27 12 1
27 15 1
27 24 1
27 31 -1
28 32 -1
29 34 -1
30 36 -1
31 29 1
31 36 -1
32 37 -1
33 9 1
33 17 1
33 22 1
33 24 1
33 40 -1
34 16 1
34 19 1
34 23 1
34 29 1
34 34 1
34 40 1
34 40 -1
35 41 -1
36 3 1
36 43 -1
37 6 1
37 43 -1
38 3 1
38 6 1
38 9 1
38 44 -1
39 9 1
39 11 1
39 20 1
39 26 1
39 30 1
39 45 -1
40 18 1
40 48 -1
41 49 -1
42 35 1
42 51 -1
43 17 1
43 53 -1
44 3 1
44 15 1
44 46 1
44 51 1
44 53 1
44 53 -1
45 59 -1
46 2 1
46 15 1
46 24 1
46 30 1
46 34 1
46 39 1
46 43 1
46 49 1
46 52 1
46 61 -1
47 5 1
47 14 1
47 19 1
47 27 1
47 41 1
47 64 -1
48 2 1
48 8 1
48 12 1
48 13 1
48 17 1
48 21 1
48 33 1
48 49 1
48 64 -1
49 1 -1
50 1 -1
51 5 1
51 5 -1
52 9 -1
53 10 -1
54 13 -1
55 3 1
55 14 -1
56 1 1
56 3 1
56 5 1
56 7 1
56 10 1
56 17 -1
57 18 -1
58 17 1
58 18 -1
59 2 1
59 19 -1
60 17 1
60 19 1
60 21 -1
61 22 -1
62 25 -1
63 25 -1
64 25 -1
65 6 1
65 12 1
65 13 1
65 26 -1
66 6 1
66 27 -1
67 2 1
67 29 -1
68 26 1
68 35 1
68 36 -1
69 38 -1
70 22 1
70 23 1
70 27 1
70 32 1
70 39 -1
71 4 1
71 16 1
71 23 1
71 27 1
71 33 1
71 36 1
71 37 1
71 39 -1
72 24 1
72 26 1
72 29 1
72 40 1
72 40 -1
73 41 -1
74 41 -1
75 1 1
75 27 1
75 43 -1
76 44 -1
77 2 1
77 20 1
77 23 1
77 27 1
77 38 1
77 44 -1
78 45 -1
79 2 1
79 46 -1
80 46 -1
81 49 -1
82 50 -1
83 4 1
83 24 1
83 47 1
83 50 -1
84 54 -1
85 38 1
85 54 -1
86 59 -1
;
data b2;
set bladder;
Age1 = Age+1;
run;
proc sort data=b2;
by Group Age;
run;
data Tumor (keep= Age Age1 Group N R);
set b2;
by Group Age;
if first.Group then do; m=0; end;
if first.Age then do;
N = nn-m;
output;
R=0;
end;
if num = -1 then m+1 ;
if num = 1 then R+1;
run;
proc print data=Tumor (obs=20);
run;
proc reliability data=Tumor;
distribution nhpp(pow);
freq R;
nenter N;
class Group;
model (Age Age1) = Group;
mcfplot(Age Age1) = Group / fit=Model;
run;