Dataplot Vol 1 Vol 2

# MCCOOL WEIBULL LOCATION TEST

Name:
MCCOOL WEIBULL LOCATION TEST
Type:
Analysis Command
Purpose:
Perform the McCool test to distinguish between a 2-parameter and a 3-parameter Weibull distribution.
Description:
When modelling Weibull data, it is often desired to determine whether a 2-parameter Weibull or a 3-parameter Weibull is more appropriate. This can be determined by testing whether the location parameter is equal to zero.

McCool described a test for this purpose that can be applied to either censored or uncensored data. The derivation of this test is given in the references listed below.

The test statistic is

$W = \frac{\hat{\gamma}_{L}} {\hat{\gamma}_{A}}$

where $$\hat{\gamma}_{A}$$ is the maximum likelihood estimate of the shape parameter from a 2-parameter Weibull distribution based on the full data set and $$\hat{\gamma}_{L}$$ is the maximum likelihood estimate of the shape parameter based on the first r1 uncensored observations.

McCool performed power studies to determine the optimal value of r1. He recommends

 r1 = 5 for n < 30 r1 = 7 for n = 40 to 60 r1 = 9 for n = 80 to 100

The critical values for this test are determined via simulation. The simulation uses 10,000 samples from a 2-parameter Weibull distribution with a shape parameter of 1 and a scale parameter of 10 (this corresponds to a tenth percentile of 1.0).

Currently, Dataplot limits this test to values of n between 10 and 100. Also, the number of uncensored observations must be greater than r1. Although the test and simulation can be computed for n > 100, optimal values of r1 have not been published.

Syntax:
MCCOOL WEIBULL LOCATION TEST <y> <x>
<SUBSET/EXCEPT/FOR qualification>
where <y> is a response variable containing failure times;
<x> is a censoring variable;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
MCCOOL WEIBULL LOCATION TEST Y X
Note:
Dataplot performs the simulation dynamically. The critical values generated by Dataplot may differ slightly from McCool's published values. This is due to a different random number generator being used.

Dataplot uses the combined Fibonacci/multiplicative congruential generator. If you do not set the seed for the generator explicitly, then a default value of 23709 will be used. If you choose to use a different value for the seed, you may see slight differences in the critical values.

These slight differences in the critical values should be small enough for practical applications of the test.

Note:
The censoring variable should have a value of 1 to specify an uncensored observation and a value of 0 to specify a censored observation. Note that Dataplot will treat any value with an absolute value less than 0.5 as a zero and any value with an absolute value greater than 0.5 as 1.

If you have uncensored data, you can create the censoring variable as follows

LET N = SIZE Y
LET X = 1 FOR I = 1 1 N
MCCOOL WEIBULL LOCATION TEST Y X
Note:
Dataplot saves the following internal parameters after a sign test:

 STATVAL: the value of the test statistic STATCDF: the CDF of the test statistic PVALUE: the p-value for the two-sided test CUTOFF50: the 50% critical value CUTOFF75: the 75% critical value CUTOFF90: the 90% critical value CUTOFF95: the 95% critical value CUTOF975: the 97.5% critical value CUTOFF99: the 99% critical value CUTOF999: the 99.9% critical value
Note:
The following statistics are also supported

LET A = MCCOOL WEIBULL LOCATION TEST Y X
LET A = MCCOOL WEIBULL LOCATION TEST CDF Y X
LET A = MCCOOL WEIBULL LOCATION TEST PVALUE Y X
LET A = MCCOOL WEIBULL LOCATION TEST CV50 Y X
LET A = MCCOOL WEIBULL LOCATION TEST CV90 Y X
LET A = MCCOOL WEIBULL LOCATION TEST CV95 Y X
Note:
If you want to perform this test for data sets with more than 100 observations, enter the command

SET MCCOOL WEIBULL LOCATION TEST R1 <value>

This defines the r1 value to use for the test. Be aware that the optimal value (in the sense of maximizing the power of the test) of r1 is not known in this case.

Note:
Another approach to this problem is to compare the AIC/BIC values for the 2-parameter and 3-parameter models (i.e., does adding the location parameter decrease these values).
Default:
None
Synonyms:
None
Related Commands:
 MAXIMUM LIKELIHOOD = Perform maximum likelihood estimation for various distributions. GOODNESS OF FIT = Perform various types of distributional goodness of fit tests. PPCC PLOT = Generate a ppcc plot. PROBABILITY PLOT = Generate a probability plot.
Reference:
John McCool (1998), "Inference on the Weibull Location Parameter," Journal of Quality Technology, Vol. 30, No. 2, pp. 119-126.

John McCool (2012), "Using the Weibull Distribution: Reliability, Modeling, and Inference," Wiley, pp. 301-307.

Horst Rinne (2009), "The Weibull Distribution: A Handbook," CRC Press, pp. 640-642.

Applications:
Distributional Modeling
Implementation Date:
2013/8
Program:

. Data set from McCool's paper
.
let y = data 90.4 94.2 97.8 101.8 104.6 113.0 118.0 154.9 181.3 186.2
let n = size y
let tag = 1 for i = 1 1 n
.
let statval = mccool weibull location test y tag
let statcdf = mccool weibull location test cdf y tag
let pvalue  = mccool weibull location test pvalue y tag
let cv50    = mccool weibull location test cv50 y tag
let cv90    = mccool weibull location test cv90 y tag
let cv95    = mccool weibull location test cv95 y tag
.
set write decimals 4
print statval statcdf pvalue cv50 cv90 cv95
.
mccool weibull location test y tag

The following output is generated
 PARAMETERS AND CONSTANTS--

STATVAL --         4.4566
STATCDF --         0.9909
PVALUE  --         0.0091
CV50    --         1.1547
CV90    --         2.1077
CV95    --         2.6370

McCool Weibull Location Test

Response Variable: Y
Censoring Variable: TAG

H0: mu = 0
Ha: mu > 0

Summary Statistics:
Total Number of Observations:                        10
Number of Uncensored Observations:                   10
Value of R1:                                          5
Value of Shape Parameter for All Data:           3.7785
Value of Shape Parameter for R1 Data:           16.8391

Test Statistic Value:                            4.4565
CDF of Test Statistic:                           0.9920
P-Value for Test Statistic:                      0.0080

Conclusions (Upper 1-Tailed Test)

------------------------------------------------------------------------
Null
Null   Significance           Test       Critical     Hypothesis
Hypothesis          Level      Statistic    Region (>=)     Conclusion
------------------------------------------------------------------------
mu = 0          50.0%         4.4565         1.1457         REJECT
mu = 0          75.0%         4.4565         1.5476         REJECT
mu = 0          90.0%         4.4565         2.1408         REJECT
mu = 0          95.0%         4.4565         2.6455         REJECT
mu = 0          97.5%         4.4565         3.1822         REJECT
mu = 0          99.0%         4.4565         4.1601         REJECT
mu = 0          99.9%         4.4565         7.6829         ACCEPT

Date created: 04/15/2013
Last updated: 12/11/2023