fitting distributions to reliability data sas code for appliance … · 2016-02-16 · lognormal...

25
10.5 Fitting Distributions to Reliability Data SAS Code for Appliance Cycle Data Example DM ’LOG; CLEAR; OUT; CLEAR;’; * ODS PRINTER PDF file=’C:\COURSES\ST528\CRSNOTES\REL1.PDF’; ODS LISTING; OPTIONS NODATE NONUMBER LS=78; ********************************************************************; *** Multiply censored appliance cycle data example (from Nelson) ***; ********************************************************************; DATA example1; INPUT cycles censor n @@; LABEL CYCLES = ’NUMBER OF CYCLES TO FAILURE’; LINES; 45 1 1 47 0 1 73 0 1 136 1 5 145 0 1 190 1 2 281 1 1 311 0 1 417 1 1 485 1 2 490 0 1 569 1 1 571 1 1 571 0 1 575 0 1 608 1 12 608 0 2 630 0 1 670 0 2 731 1 1 838 0 1 964 0 2 1164 1 7 1198 1 1 1198 0 1 1300 1 3 ; PROC LIFETEST DATA=example1 PLOTS=(LS,LLS,S) OUTSURV=survive ; TITLE F=SWISSB H=.4 CM ’RELIABILITY ANALYSIS: APPLIANCE CYCLE DATA’; TIME cycles*censor(1); FREQ n; SYMBOL1 H=1 V=DOT W=2; PROC PRINT DATA=survive; RUN; PROC RELIABILITY DATA=example1; DISTRIBUTION EXPONENTIAL; PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB; FREQ n; SYMBOL1 H=1.5 V=CIRCLE W=2; TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING AN EXPONENTIAL DISTRIBUTION’; RUN; /* PROC RELIABILITY DATA=example1; DISTRIBUTION EXTREME; PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB; FREQ n; SYMBOL1 H=1.5 V=CIRCLE W=2; TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING AN EXTREME VALUE DISTRIBUTION’; RUN; */ 263

Upload: others

Post on 09-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

10.5 Fitting Distributions to Reliability Data

SAS Code for Appliance Cycle Data Example

DM ’LOG; CLEAR; OUT; CLEAR;’;* ODS PRINTER PDF file=’C:\COURSES\ST528\CRSNOTES\REL1.PDF’;ODS LISTING;OPTIONS NODATE NONUMBER LS=78;

********************************************************************;*** Multiply censored appliance cycle data example (from Nelson) ***;********************************************************************;

DATA example1;INPUT cycles censor n @@;

LABEL CYCLES = ’NUMBER OF CYCLES TO FAILURE’;LINES;

45 1 1 47 0 1 73 0 1 136 1 5 145 0 1 190 1 2281 1 1 311 0 1 417 1 1 485 1 2 490 0 1 569 1 1571 1 1 571 0 1 575 0 1 608 1 12 608 0 2 630 0 1670 0 2 731 1 1 838 0 1 964 0 2 1164 1 7 1198 1 1

1198 0 1 1300 1 3;

PROC LIFETEST DATA=example1 PLOTS=(LS,LLS,S) OUTSURV=survive ;TITLE F=SWISSB H=.4 CM ’RELIABILITY ANALYSIS: APPLIANCE CYCLE DATA’;

TIME cycles*censor(1);FREQ n;SYMBOL1 H=1 V=DOT W=2;

PROC PRINT DATA=survive;RUN;

PROC RELIABILITY DATA=example1;DISTRIBUTION EXPONENTIAL;PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB;FREQ n;SYMBOL1 H=1.5 V=CIRCLE W=2;

TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING AN EXPONENTIALDISTRIBUTION’;RUN;

/*PROC RELIABILITY DATA=example1;

DISTRIBUTION EXTREME;PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB;FREQ n;SYMBOL1 H=1.5 V=CIRCLE W=2;

TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING AN EXTREME VALUEDISTRIBUTION’;RUN;*/

263

Page 2: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

/*PROC RELIABILITY DATA=example1;

DISTRIBUTION LOGISTIC;PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB;FREQ n;SYMBOL1 H=1.5 V=CIRCLE W=2;

TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING A LOGISTICDISTRIBUTION’;RUN;*//*PROC RELIABILITY DATA=example1;

DISTRIBUTION LOGLOGISTIC;PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB;FREQ n;SYMBOL1 H=1.5 V=CIRCLE W=2;

TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING A LOGLOGISTICDISTRIBUTION’;RUN;*//*PROC RELIABILITY DATA=example1;

DISTRIBUTION LOGNORMAL;PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB;FREQ n;SYMBOL1 H=1.5 V=CIRCLE W=2;

TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING A LOGNORMALDISTRIBUTION’;RUN;*//*PROC RELIABILITY DATA=example1;

DISTRIBUTION NORMAL;PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB;FREQ n;SYMBOL1 H=1.5 V=CIRCLE W=2;

TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING A NORMAL DISTRIBUTION’;RUN;*//*PROC RELIABILITY DATA=example1;

DISTRIBUTION WEIBULL;PROBPLOT cycles*censor(1) / WAXIS=2 WFIT=2 FONT=SWISSB;FREQ n;SYMBOL1 H=1.5 V=CIRCLE W=2;

TITLE F=SWISSB H=.4 CM ’APPLIANCE CYCLE DATA: FITTING A WEIBULLDISTRIBUTION’;RUN;*/

264

Page 3: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

10.5.1 Fitting Distributions to the Appliance Cycle Data

265

Page 4: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

266

Page 5: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

267

Page 6: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

10.5.2 Exponential Data

• Suppose the sample times of the n units are y1, y2, . . . , yn of which r are failuretimes and n− r are censored survival times.

• The maximum likelihood estimate (MLE) for the mean θ is θ̂ =1

r

n∑i=1

yi.

Thus, the MLE is the total time for all n units divided by the number offailures r.

• The following table contains data on 70 diesel engine fans with 344,400 hoursof service. Only 12 of the 70 failed, with 58 censored times. Managementwanted an estimate and a confidence interval for the fraction failing on an8000 hour warranty.

Example: Time to Fan Failure in Hours (+ denotes censored times)

10.4 Other Distributions

260

10.4 Other Distributions

260

10.4 Other Distributions

260

268

Page 7: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

261

261

Weibull Data

262

262

269

Page 8: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

Lognormal Data

• Formulas for MLEs and confidence intervals for µ and σ are complex, and can be found inApplied Life Data Analysis (1982) by Wayne Nelson.

• Statistical packages, like SAS, provide MLEs and approximate confidence intervals for µ, σ,percentiles, and reliabilities.

• The following table contains the singly-censored life data on 96 locomotive controls. There isalso a lognormal probability plot of the data with 95% confidence bands about the percentilesfrom the fitted MLE-based lognormal distribution.

• Management wanted an estimate and confidence intervals for the fraction of controls failingon an 80 thousand mile warranty.

Example: Locomotive Control Time to Failure Data

263

Lognormal Probability Plot of Locomotive Control Failures

263

270

Page 9: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

10.5.3 Fitting Distributions to the Grinder Lifetime Data

271

Page 10: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

272

Page 11: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

273

Page 12: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

10.5.4 Fitting Distributions to the Fan Failure Lifetime Data

274

Page 13: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

275

Page 14: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

276

Page 15: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

10.5.5 Fitting Distributions to the Locomotive Control Lifetime Data

277

Page 16: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

278

Page 17: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

279

Page 18: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

10.6 Competing Failure Modes

We now consider a case with two modes of failure with the mode of each failure known. We will

(i) consider fitting a life distribution ignoring the mode of failure and

(ii) fitting separate life distributions for each failure mode.

10.6 Competing Failure Modes

273

10.6 Competing Failure Modes

273

10.6 Competing Failure Modes

273

10.6 Competing Failure Modes

273

274

280

Page 19: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

281

Page 20: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

282

Page 21: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

283

Page 22: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

284

Page 23: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

285

Page 24: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

286

Page 25: Fitting Distributions to Reliability Data SAS Code for Appliance … · 2016-02-16 · Lognormal Data Formulas for MLEs and con dence intervals for and ˙are complex, and can be found

10.7 Confidence Intervals for Distribution Parameters

• Let θ = (θ1, θ2, . . . , θk) be the vector of distribution parameters, and θ̂MLE = (θ̂1, θ̂2, . . . , θ̂k)be the vector of maximum likelihood estimates (MLEs).

• The estimated covariance matrix of θ̂MLE is:

Σ̂ = [σ̂ij] = −H−1 = −[∂2l(θ)

∂θi∂θj

]−1

θ=θ̂MLE

.

This is the negative of the matrix of second derivatives of the log likelihood l(θ) evaluated at

the MLE parameter estimate vector θ̂MLE.

• The negative of the matrix of second derivatives of the log likelihood l(θ) is called the Fisherinformation matrix.

• The σ̂ii diagonal entry of θ̂MLE is an estimate of the variance of the ith MLE θ̂i.

• The standard error of the ith MLE θ̂i is SE(θ̂i =√σ̂ii.

• The following table summarizes the computation used by SAS to generate confidence intervalsfor the MLEs of the distribution parameters.

Parameter TypeDistribution Location Scale ShapeNormal µL = µ̂− z∗SE(µ̂) σL = σ̂ / exp[z∗SE(σ̂)/σ̂]

µU = µ̂+ z∗SE(µ̂) σU = σ̂ × exp[z∗SE(σ̂)/σ̂]Lognormal µL = µ̂− z∗SE(µ̂) σL = σ̂ / exp[z∗SE(σ̂)/σ̂]

µU = µ̂+ z∗SE(µ̂) σU = σ̂ × exp[z∗SE(σ̂)/σ̂]Extreme Value µL = µ̂− z∗SE(µ̂) σL = σ̂ / exp[z∗SE(σ̂)/σ̂]

µU = µ̂+ z∗SE(µ̂) σU = σ̂ × exp[z∗SE(σ̂)/σ̂]Exponential αL = exp[µ̂− z ∗ SE(µ̂)]

αU = exp[µ̂+ z ∗ SE(µ̂)]Weibull αL = exp[µ̂− z ∗ SE(µ̂)] βL = exp[−z∗SE(σ̂)/σ̂] / σ̂

αU = exp[µ̂+ z ∗ SE(µ̂)] βU = exp[ z∗SE(σ̂)/σ̂] / σ̂Logistic µL = µ̂− z∗SE(µ̂) σL = σ̂ / exp[z∗SE(σ̂)/σ̂]

µU = µ̂+ z∗SE(µ̂) σU = σ̂ × exp[z∗SE(σ̂)/σ̂]Log-logistic µL = µ̂− z∗SE(µ̂) σL = σ̂ / exp[z∗SE(σ̂)/σ̂]

µU = µ̂+ z∗SE(µ̂) σU = σ̂ × exp[z∗SE(σ̂)/σ̂]

• For the exponential distribution, µ̂ is the location parameter of the extreme value distributionfor the logarithm of lifetime. This is denoted as “EV location” in the SAS output.

• For the Weibull distribution, µ̂ and σ̂ are the location and scale parameters of the extremevalue distribution for the logarithm of lifetime. These are denoted as “EV location” and “EVscale” in the SAS output.

287