Chapter Contents |
Previous |
Next |
The GENMOD Procedure |
Life data are sometimes modeled with the gamma distribution. Although PROC GENMOD does not analyze censored data or provide other useful lifetime distributions such as the Weibull or lognormal, it can be used for modeling complete (uncensored) data with the gamma distribution, and it can provide a statistical test for the exponential distribution against other gamma distribution alternatives. Refer to Lawless (1982) or Nelson (1982) for applications of the gamma distribution to life data.
The following data represent failure times of machine parts, some of which are manufactured by manufacturer A and some by manufacturer B.
data A; input lifetime@@ ; mfg = 'A'; datalines; 620 470 260 89 388 242 103 100 39 460 284 1285 218 393 106 158 152 477 403 103 69 158 818 947 399 1274 32 12 134 660 548 381 203 871 193 531 317 85 1410 250 41 1101 32 421 32 343 376 1512 1792 47 95 76 515 72 1585 253 6 860 89 1055 537 101 385 176 11 565 164 16 1267 352 160 195 1279 356 751 500 803 560 151 24 689 1119 1733 2194 763 555 14 45 776 1 ; data B; input lifetime@@ ; mfg = 'B'; datalines; 1747 945 12 1453 14 150 20 41 35 69 195 89 1090 1868 294 96 618 44 142 892 1307 310 230 30 403 860 23 406 1054 1935 561 348 130 13 230 250 317 304 79 1793 536 12 9 256 201 733 510 660 122 27 273 1231 182 289 667 761 1096 43 44 87 405 998 1409 61 278 407 113 25 940 28 848 41 646 575 219 303 304 38 195 1061 174 377 388 10 246 323 198 234 39 308 55 729 813 1216 1618 539 6 1566 459 946 764 794 35 181 147 116 141 19 380 609 546 ; data lifdat; set A B; run;
The following SAS statements use PROC GENMOD to compute Type 3 statistics to test for differences between the two manufacturers in machine part life. Type 3 statistics are identical to Type 1 statistics in this case, since there is only one effect in the model. The log link function is selected to ensure that the mean is positive.
proc genmod data = lifdat; class mfg; model lifetime = mfg / dist=gamma link=log type3; run;
The output from these statements is displayed in Output 29.3.1.
Output 29.3.1: Gamma Model of Life DataUsing the following statements, you can refit the model without using the manufacturer as an effect. The LRCI option in the MODEL statement is specified to compute profile likelihood confidence intervals for the mean life and scale parameters.
proc genmod data = lifdat; model lifetime = / dist=gamma link=log lrci; run;Output 29.3.2: Refitting of the Gamma Model: Omitting the mfg Effect
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.