Title: | Goodness-of-Fit Test for Weibull Distribution (Weibullness) |
Version: | 1.24.1 |
Date: | 2024-1-9 |
Author: | Chanseok Park |
Maintainer: | Chanseok Park <statpnu@gmail.com> |
Depends: | R (≥ 4.0), graphics, stats |
Imports: | methods |
Suggests: | bsgof |
Description: | Conducts a goodness-of-fit test for the Weibull distribution (referred to as the weibullness test) and furnishes parameter estimations for both the two-parameter and three-parameter Weibull distributions. Notably, the threshold parameter is derived through correlation from the Weibull plot. Additionally, this package conducts goodness-of-fit assessments for the exponential, Gumbel, and inverse Weibull distributions, accompanied by parameter estimations. For more details, see Park (2017) <doi:10.23055/ijietap.2017.24.4.2848>, Park (2018) <doi:10.1155/2018/6056975>, and Park (2023) <doi:10.3390/math11143156>. This work was supported by the National Research Foundation of Korea (NRF) grants funded by the Korea government (MSIT) (No. 2022R1A2C1091319, RS-2023-00242528). |
License: | GPL-2 | GPL-3 |
URL: | https://AppliedStat.GitHub.io/R/ |
BugReports: | https://github.com/AppliedStat/R/issues |
Encoding: | UTF-8 |
LazyData: | yes |
LazyDataCompression: | xz |
NeedsCompilation: | no |
Packaged: | 2024-01-09 05:20:33 UTC; cp |
Repository: | CRAN |
Date/Publication: | 2024-01-09 14:50:02 UTC |
Exponential quantile values
Description
Quantiles for the exponential goodness-of-fit test. They are obtained from the sample correlation from ANOVA test for exponential distribution. The number of Monte Carlo iterations is 1E08.
Dataset representing the quantiles and the associated critical values for the Weibullness test. They were obtained by conducting Monte Carlo simulations where the sample correlation coefficients were calculated based on ANOVA test for exponential distribution. We used 1.0E08 Monte Carlo iterations in the simulation.
Usage
Exponential.ANOVA.Quantiles
Format
This data frame contains 998 rows and 1001 columns.
Gumbel quantile values
Description
Quantiles for the Gumbel goodness-of-fit test. They are obtained from the sample correlation from the Gumbel probability plot. The number of Monte Carlo iterations is 1E08.
Dataset representing the quantiles and the associated critical values for the Gumbel goodness-of-fit test. They were obtained by conducting Monte Carlo simulations where the sample correlation coefficients were calculated based on the Gumbel probability plot. We used 1.0E08 Monte Carlo iterations in the simulation.
Usage
Gumbel.Plot.Quantiles
Format
This data frame contains 998 rows and 1001 columns.
Inverse Weibull quantile values
Description
Quantiles for the inverse Weibullness Test. They are obtained from the sample correlation from the inverse Weibull plot. The number of Monte Carlo iterations is 1E08.
Dataset representing the quantiles and the associated critical values for the inverse Weibullness test. They were obtained by conducting Monte Carlo simulations where the sample correlation coefficients were calculated based on the inverse Weibull plot. We used 1.0E08 Monte Carlo iterations in the simulation.
Usage
IW.Plot.Quantiles
Format
This data frame contains 998 rows and 1001 columns.
References
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Dataset
Description
bearings
: It is from Lieblein and Zelen (1956).
These data are deep-groove ball bearings failure times (number of millions of revolutions) in eudurance tests.
glassfiber1.5
and glassfiber15
: They are from Smith and Naylor (1987).
These datasets are from experimental data for the strength of glass fiber of length 1.5cm and 15cm, respectively.
urinary
: It is from Santiago and Smith (2013).
It is about the days in between discharge of males in nosocomial urinary tract infections in patients.
radiotherapy
and radio.chemotherapy
: They are from Finkelstein, D. M. (1986)
and Lindsey, J. C. and L. M. Ryan (1998).
These data are interval-censored observations from a study of patients with breast cancer.
The measurement is the time to cosmetic deterioration of the breast for women who received radiotherapy
and women who received radio-chemotherapy.
Usage
Wdata
References
Lieblein, J. and M. Zelen (1956). Statistical Investigation of the Fatigue Life of Deep-Groove Ball Bearings. Journal of Research of the National Bureau of Standards, 57 (5), 273-316.
Smith, R. L. and J. C. Naylor (1987). A comparison of maximum likelihood and Bayesian estimators for the three-parameter Weibull distribution. Journal of the Royal Statistical Society. Series C (Applied Statistics), 36 (3), 358-369.
Santiago, E. and J. Smith (2013). Control Charts Based on the Exponential Distribution: Adapting Runs Rules for the t Chart, Quality Engineering, 25 (2), 85-96.
Finkelstein, D. M. (1986), A proportional hazards model for interval-censored failure time data. Biometrics, 42, 845-865.
Lindsey, J. C. and L. M. Ryan (1998). Tutorial in biostatistics: Methods for interval-censored data. Stat. Med., 17, 219-238.
Examples
# Attach datasets
attach(Wdata)
bearings
glassfiber1.5
glassfiber15
urinary
radiotherapy
radio.chemotherapy
Weibull quantile values
Description
Quantiles for the Weibullness Test. They are obtained from the sample correlation from the Weibull plot. The number of Monte Carlo iterations is 1E08.
Dataset representing the quantiles and the associated critical values for the Weibullness test. They were obtained by conducting Monte Carlo simulations where the sample correlation coefficients were calculated based on the Weibull plot. We used 1.0E08 Monte Carlo iterations in the simulation.
Usage
Weibull.Plot.Quantiles
Format
This data frame contains 998 rows and 1001 columns.
References
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Exponential Probability Plot
Description
ep.plot
produces a exponential probability plot.
Usage
ep.plot(x, plot.it=TRUE, a, col.line="black", lty.line=1,
xlim=NULL, ylim=NULL, main=NULL, sub=NULL, xlab=NULL, ylab="Probability", ...)
Arguments
x |
a numeric vector of data values. Missing values are allowed. |
plot.it |
logical. Should the result be plotted? |
a |
the offset fraction to be used; typically in (0,1). See |
col.line |
the color of the straight line. |
lty.line |
the line type of the straight line. |
xlim |
the x limits of the plot. |
ylim |
the y limits of the plot. |
main |
a main title for the plot, see also |
sub |
a sub title for the plot. |
xlab |
a label for the x axis, defaults to a description of x. |
ylab |
a label for the y axis, defaults to "Probability". |
... |
graphical parameters. |
Details
The exponential probability plot is based on taking the logarithm of the exponential cumulative distribution function.
Value
A list with the following components:
x |
The sorted data |
y |
-log(1-ppoints(n,a=a)) |
Author(s)
Chanseok Park
See Also
plot
, qqnorm
, qqplot
, wp.plot
, iwp.plot
.
bs.plot
for the Birnbaum-Saunders probability plot in package bsgof.
Examples
x = rexp(50)
# With cosmetic lines
ep.plot(x, main="Exponential Probability Plot", col.line="red", lty.line=1, pch=3)
hline = -log(1- c(0.01,(1:9)/10,0.99))
abline( h=hline, col=gray(0.1), lty=3, lwd=0.5 )
abline( v=seq(0, 5,by=0.5), col=gray(0.1), lty=3, lwd=0.5 )
The Exponential Goodness-of-Fit Test from the Exponential Probability Plot
Description
Performs Goodness-of-fit test for the exponential distribution using the sample correlation from the exponential probability plot.
Usage
ep.test(x, a)
Arguments
x |
a numeric vector of data values. Missing values are allowed, but the number of non-missing values must be between 3 and 1000. |
a |
the offset fraction to be used; typically in (0,1). See ppoints(). |
Details
The exponential goodness-of-fit test is constructed using the sample correlation
which is calculated using the associated exponential probability plot.
The critical value is then looked up in Exponential.Plot.Quantiles.
There is print
method for class "htest"
.
Value
A list with class "htest" containing the following components:
statistic |
the value of the test statistic (sample correlation from the exponential probability plot) |
p.value |
the p-value for the test. |
sample.size |
sample size (missing observations are deleted). |
method |
a character string indicating the exponential goodness-of-fit test. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Chanseok Park
References
Shapiro, S. S. and M. B. Wilk (1972). An Analysis of Variance Test for the Exponential Distribution (Complete Samples). Technometrics, 14(2), 355-370.
See Also
ks.test
for performing the Kolmogorov-Smirnov test for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
wp.test
for performing the Weibullness test based on the Weibull probability plot.
Examples
# For Exponential GOF.
# Dataset from Section 2.5 of Shapiro and Wilk (1972).
x = c(6, 1, -4, 8, -2, 5, 0)
ep.test(x)
Critical Value for the Exponential Goodness-of-Fit test
Description
Calculates the critical value for the Weibullness test
Usage
ep.test.critical(alpha, n)
Arguments
alpha |
the significance level. |
n |
the sample size. |
Details
This function calculates the critical value for the Weibullness test
which is constructed using the sample correlation
from the associated Weibull plot.
The critical value is then looked up in Weibull.Plot.Quantiles.
There is print
method for class "ep.test.critical"
.
Value
A list with class "ep.test.critical"
containing the following components:
sample.size |
sample size (missing observations are deleted). |
alpha |
significance level. |
critical.value |
critical value. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Chanseok Park
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
wp.test
for performing the Weibullness test.
Examples
# Critical value with alpha (significance level) and n (sample size).
ep.test.critical(alpha=0.0982, n=7)
The p-value for the Exponential Goodness-of-Fit Test
Description
Calculates the p-value for the exponential goodness-of-fit test which is based on the sample correlation from the exponential probability plot.
Usage
ep.test.pvalue(w, n)
Arguments
w |
the ANOVA test statistic; w is in (0,1). |
n |
the sample size. |
Details
The p-value for the exponential goodness-of-fit test which is based on
the sample correlation from the exponential probability plot.
There is print
method for class "htest"
.
Value
A list with class "htest" containing the following components:
statistic |
the value of the test statistic (sample correlation from the exponential probability plot) |
p.value |
the p-value for the test. |
method |
a character string indicating the exponential probability test. |
Author(s)
Chanseok Park
References
Shapiro, S. S. and M. B. Wilk (1972). An Analysis of Variance Test for the Exponential Distribution (Complete Samples). Technometrics, 14(2), 355-370.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
wp.test
for performing the Weibullness test.
Examples
# p.value with w (ANOVA statistic) and n (sample size).
ep.test.pvalue(w=0.35593, n=7)
Gumbel Probability Plot
Description
gp.plot
produces a Gumbel probability plot.
Usage
gp.plot(x, plot.it=TRUE, a, col.line="black", lty.line=1,
xlim=NULL, ylim=NULL, main=NULL, sub=NULL, xlab=NULL, ylab="Probability", ...)
Arguments
x |
a numeric vector of data values. Missing values are allowed. |
plot.it |
logical. Should the result be plotted? |
a |
the offset fraction to be used; typically in (0,1). See |
col.line |
the color of the straight line. |
lty.line |
the line type of the straight line. |
xlim |
the x limits of the plot. |
ylim |
the y limits of the plot. |
main |
a main title for the plot, see also |
sub |
a sub title for the plot. |
xlab |
a label for the x axis, defaults to a description of x. |
ylab |
a label for the y axis, defaults to "Probability". |
... |
graphical parameters. |
Details
The Gumbel probability plot is based on taking the logarithm of the Gumbel cumulative distribution function twice.
Value
A list with the following components:
x |
The sorted data |
y |
-log(-log(ppoints(n,a=a))) |
Author(s)
Chanseok Park
See Also
plot
, qqnorm
, qqplot
, wp.plot
, iwp.plot
, ep.plot
.
bs.plot
for the Birnbaum-Saunders probability plot in package bsgof.
Examples
x = c(-3.16, -3.07, -2.24, -1.8, -1.48, -0.92, -0.87, -0.41, -0.06, 1.15)
# With cosmetic lines
gp.plot(x, main="Gumbel Probability Plot", col.line="red",
xlab="Lifetimes of bearings", lty.line=1, pch=3)
hline = -log(-log(c( (1:5)/100, (1:9)/10)))
abline( h=hline, col=gray(0.1), lty=3, lwd=0.5 )
abline( v=seq(-4, 2,by=0.5), col=gray(0.1), lty=3, lwd=0.5 )
Gumbel Goodness-of-Fit Test from a Gumbel Probability Plot
Description
Performs the statistical goodness-of-fit test for the Gumbel distribution using the sample correlation from the Gumbel probability plot.
Usage
gp.test(x, a)
Arguments
x |
a numeric vector of data values. Missing values are allowed, but the number of non-missing values must be between 3 and 1000. |
a |
the offset fraction to be used; typically in (0,1). See ppoints(). |
Details
The Gumbel goodness-of-fit test is constructed using the sample correlation
which is calculated using the associated Gumbel probability plot.
The critical value is then looked up in Gumbel.Plot.Quantiles.
There is print
method for class "htest"
.
Value
A list with class "htest" containing the following components:
statistic |
the value of the test statistic (sample correlation from the Gumbel probability plot) |
p.value |
the p-value for the test. |
sample.size |
sample size (missing observations are deleted). |
method |
a character string indicating the Gumbel goodness-of-fit test. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Chanseok Park
References
Kinnison, R. (1989). Correlation Coefficient Goodness-of-Fit Test for the Extreme-Value Distribution. The American Statistician, 43(2), 98-100.
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
wp.test
for performing the Weibullness test.
Examples
# Gumbel goodness-of-fit test.
x = c(-3.16, -3.07, -2.24, -1.8, -1.48, -0.92, -0.87, -0.41, -0.06, 1.15)
gp.test(x)
Critical Value for the Gumbel Goodness-of-Fit Test
Description
Calculates the critical value for the Gumbel goodness-of-fit test
Usage
gp.test.critical(alpha, n)
Arguments
alpha |
the significance level. |
n |
the sample size. |
Details
This function calculates the critical value for the Gumbel Goodness-of-Fit test
which is constructed using the sample correlation from
the associated Gumbel probability plot.
The critical value is then looked up in Gumbel.Plot.Quantiles.
There is print
method for class "gp.test.critical"
.
Value
A list with class "gp.test.critical"
containing the following components:
sample.size |
sample size (missing observations are deleted). |
alpha |
significance level. |
critical.value |
critical value. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Chanseok Park
References
Kinnison, R. (1989). Correlation Coefficient Goodness-of-Fit Test for the Extreme-Value Distribution. The American Statistician, 43(2), 98-100.
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
wp.test
for performing the Weibullness test.
shapiro.test
for performing the Shapiro-Wilk test for normality.
Examples
# Critical value with alpha (significance level) and n (sample size).
gp.test.critical(alpha=0.01, n=10)
The p-value for the Gumbel goodness-of-Fit Test
Description
Calculates the p-value for the Gumbel goodness-of-fit test which is based on the sample correlation from the Gumbel probability plot.
Usage
gp.test.pvalue(r, n)
Arguments
r |
the sample correlation coefficient from the Gumbel probability plot; r is in (0,1). |
n |
the sample size. |
Details
The p-value for the Gumbel goodness-of-fit test which is based on
the sample correlation from the Gumbel probability plot.
There is print
method for class "htest"
.
Value
A list with class "htest" containing the following components:
statistic |
the value of the test statistic (sample correlation from the Gumbel probability plot) |
p.value |
the p-value for the test. |
method |
a character string indicating the Gumbel goodness-of-fit test. |
Author(s)
Chanseok Park
References
Kinnison, R. (1989). Correlation Coefficient Goodness-of-Fit Test for the Extreme-Value Distribution. The American Statistician, 43(2), 98-100.
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
wp.test
for performing the Weibullness test.
shapiro.test
for performing the Shapiro-Wilk test for normality.
Examples
# p.value with r (sample correlation from the Gumbel probability plot) and n (sample size).
gp.test.pvalue(r=0.98504, n=10)
Estimate of location and scale parameters of the Gumbel distribution
Description
Calculates the estimates of the location and scale parameters fromn the Gumbel probability plot.
Usage
gumbel.gp(x, n, a)
Arguments
x |
a numeric vector of observations. |
n |
The number of observations is needed if there is right-censoring. |
a |
the offset fraction to be used; typically in (0,1). See |
Details
gumbel.gp
obtains the estimates of the location and scale
parameters using the intercept and slope estimates from the
Gumbel probability plot.
Value
An object of class "gumbel.estimate"
, a list with
two parameter estimates
Author(s)
Chanseok Park
See Also
weibull.wp
for the parameter estimation using the Weibull plot.
Examples
x = c(-2.73, 11.69, 34.85, 7.97, -0.86, 17.46, 9.69, -7.14, 14.86, 16.85)
gumbel.gp(x)
The inverse Weibull distribution
Description
Density function, distribution function, quantile function, random generation,
raw moments and limited moments for the Inverse Weibull distribution
with parameters shape
and scale
.
Usage
dinvweibull(x, shape, scale = 1, log = FALSE)
pinvweibull(q, shape, scale = 1, lower.tail = TRUE, log.p = FALSE)
qinvweibull(p, shape, scale = 1, lower.tail = TRUE, log.p = FALSE)
rinvweibull(n, shape, scale = 1)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
shape , scale |
parameters. Must be positive. |
log , log.p |
logical; if |
lower.tail |
logical; if |
Details
The probability density function of the inverse Weibull distribution with parameters shape
=\beta
and scale
= \theta
is given by
f(x) = \frac{\beta (\theta/x)^\beta e^{-(\theta/x)^\beta}}{x}
where x > 0
, \beta > 0
and \theta > 0
.
The cumulative distribution function is given by
F(X)=\exp(-(\theta/x)^\beta)
Value
dinvweibull
gives the density, pinvweibull
gives the distribution function,
qinvweibull
gives the quantile function, and rinvweibull
generates random deviates.
Author(s)
Chanseok Park
Examples
x = (-1):2
names(x) = letters[1:4]
dinvweibull(x, shape=2)
exp( dinvweibull(x, shape=2, log=TRUE) )
pinvweibull (1, shape=2)
exp(pinvweibull (1, shape=2, log=TRUE))
q = c(-1,0,1,2)
qinvweibull ( pinvweibull (q, shape=2), shape=2 )
Maximum likelihood estimates of the two-parameter inverse Weibull distribution
Description
Calculates the maximum likelihood estimates of the two-parameter Weibull distribution.
Usage
invweibull.mle(x, interval, tol = .Machine$double.eps^0.25, maxiter = 1000, trace = 0)
Arguments
x |
a numeric vector of observations. |
interval |
a vector containing the end-points of the interval to be estimated for the shape parameter. |
tol |
the desired accuracy (convergence tolerance). |
maxiter |
the maximum number of iterations. |
trace |
integer number; if positive, tracing information is produced. Higher values giving more details. |
Details
The two-parameter inverse Weibull distribution has the cumulative distribution function
F(X)=\exp(-(\theta/x)^\beta)
where x>0
, \beta>0
and \theta>0
.
The shape (\beta
) and scale (\theta
) parameters are estimated
by calling weibull.mle
on the reciprocally transformed data.
The maximum likelihood estimation on the the reciprocally transformed data is performed using the method by
Farnum and Booth (1997).
If interval
is missing, the interval is given by the method in
Farnum and Booth (1997).
Convergence is declared either if f(x) == 0
or the change in x
for one step of the algorithm is less than
tol
(see also uniroot
).
If the algorithm does not converge in maxiter
steps,
a warning is printed and the current approximation is returned
(see also uniroot
).
Value
An object of class "weibull.estimate"
, a list with
two parameter estimates.
Author(s)
Chanseok Park
References
Farnum, N. R. and P. Booth (1997). Uniqueness of Maximum Likelihood Estimators of the 2-Parameter Weibull Distribution. IEEE Transactions on Reliability, 46, 523-525.
Examples
# Three-parameter Weibull
data = c(355,725,884,462,1092,190,166,172,188,224,267,298,355,471,
154,101,76,811,80,249,752,305,301,386,667,212,186,127,
121,214,242,237,355,210,253,400,401,514,211,285)
invweibull.mle(data)
Inverse Weibull Probability Plot
Description
iwp.plot
produces an inverse Weibull probability plot.
Usage
iwp.plot(x, plot.it=TRUE, a, col.line="black", lty.line=1,
xlim=NULL, ylim=NULL, main=NULL, sub=NULL, xlab=NULL, ylab="Probability", ...)
Arguments
x |
a numeric vector of data values. Missing values are allowed. |
plot.it |
logical. Should the result be plotted? |
a |
the offset fraction to be used; typically in (0,1). See |
col.line |
the color of the straight line. |
lty.line |
the line type of the straight line. |
xlim |
the x limits of the plot. |
ylim |
the y limits of the plot. |
main |
a main title for the plot, see also |
sub |
a sub title for the plot. |
xlab |
a label for the x axis, defaults to a description of x. |
ylab |
a label for the y axis, defaults to "Probability". |
... |
graphical parameters. |
Details
The inverse Weibull probability plot is based on taking the logarithm of the inverse Weibull cumulative distribution function twice.
Value
A list with the following components:
x |
The sorted data |
y |
-log(-log(ppoints(n,a=a))) |
Author(s)
Chanseok Park
See Also
plot
, qqnorm
, qqplot
, wp.plot
.
Examples
x = c(0.38, 0.41, 1.2, 0.52, 0.69, 0.89, 0.67, 1.59, 0.55, 0.59)
iwp.plot( x )
# With cosmetic lines
iwp.plot(x, main="Inverse Weibull Probability Plot", col.line="red",
xlab="Lifetimes of bearings", lty.line=1, pch=3)
hline = -log(-log( c( (1:5)/100, (1:9)/10) ))
abline( h=hline, col=gray(0.1), lty=3, lwd=0.5 )
abline( v= seq(0, 2,by=0.1), col=gray(0.1), lty=3, lwd=0.5 )
Weibullness Test from a inverse Weibull Plot
Description
Performs the statistical test of inverse Weibullness (Goodness-of-fit test for the inverse Weibull distribution) using the sample correlation from the inverse Weibull plot.
Usage
iwp.test(x, a)
Arguments
x |
a numeric vector of data values. Missing values are allowed, but the number of non-missing values must be between 3 and 1000. |
a |
the offset fraction to be used; typically in (0,1). See ppoints(). |
Details
The inverse Weibullness test is constructed using the sample correlation
which is calculated using the associated inverse Weibull plot.
The critical value is then looked up in IW.Plot.Quantiles.
There is print
method for class "htest"
.
Value
A list with class "htest" containing the following components:
statistic |
the value of the test statistic (sample correlation from the inverse Weibull plot) |
p.value |
the p-value for the test. |
sample.size |
sample size (missing observations are deleted). |
method |
a character string indicating the inverse Weibullness test. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Chanseok Park
References
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice,
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
wp.test
for performing the Weibullness test.
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
Examples
# For inverse Weibullness hypothesis test.
attach(Wdata)
iwp.test(urinary)
Critical Value for the inverse Weibullness Test
Description
Calculates the critical value for the inverse Weibullness test
Usage
iwp.test.critical(alpha, n)
Arguments
alpha |
the significance level. |
n |
the sample size. |
Details
This function calculates the critical value for the inverse Weibullness test
which is constructed using the sample correlation
from the associated inverse Weibull plot.
The critical value is then looked up in IW.Plot.Quantiles.
There is print
method for class "iwp.test.critical"
.
Value
A list with class "iwp.test.critical"
containing the following components:
sample.size |
sample size (missing observations are deleted). |
alpha |
significance level. |
critical.value |
critical value. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Chanseok Park
References
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice,
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
Examples
# Critical value with alpha (significance level) and n (sample size).
iwp.test.critical(alpha=0.01, n=10)
The p-value for the inverse Weibullness Test
Description
Calculates the p-value for the inverse Weibullness test which is based on the sample correlation from the inverse Weibull plot.
Usage
iwp.test.pvalue(r, n)
Arguments
r |
the sample correlation coefficient from the Weibull plot; r is in (0,1). |
n |
the sample size. |
Details
The p-value for the inverse Weibullness test which is based on
the sample correlation from the inverse Weibull plot.
There is print
method for class "htest"
.
Value
A list with class "htest" containing the following components:
statistic |
the value of the test statistic (sample correlation from the Weibull plot) |
p.value |
the p-value for the test. |
method |
a character string indicating the inverse Weibullness test. |
Author(s)
Chanseok Park
References
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice,
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
Examples
# p.value with r (sample correlation from the inverse Weibull plot) and n (sample size).
iwp.test.pvalue(r=0.6, n=10)
Maximum likelihood estimates with interval censoring
Description
Calculates the maximum likelihood estimates with interval censoring using the EM Algorithm.
Usage
weibull.ic(X, start=c(1,1), maxits=10000, eps=1E-5)
Arguments
X |
a numeric matrix (n x 2) of observations. |
start |
a starting value. |
maxits |
the maximum number of iterations. |
eps |
the desired accuracy (convergence tolerance). |
Details
The expectation-maximization(EM) algorithm is used for estimating the parameters with interval-censored data.
Value
Calculates the maximum likelihood estimates with interval-censored data
Author(s)
Chanseok Park
References
Park, C. (2023).
A Note on Weibull Parameter Estimation with Interval Censoring Using the EM Algorithm.
Mathematics, 11(14), 3156.
doi: 10.3390/math11143156
Lawless, J. F. (2003). Statistical Models and Methods for Lifetime Data, 2nd ed.; John Wiley & Sons: New York, NY.
See Also
weibull.wp
for the parameter estimation using the Weibull plot with full observations.
weibull.mle
for the parameter estimation using the maximum likelihood method with full observations.
Examples
attach(Wdata)
weibull.ic(radio.chemotherapy)
# Two-parameter Weibull with full observations
weibull.ic( cbind(bearings,bearings) )
# Two-parameter Weibull with full observations (using weibull.mle)
weibull.mle(bearings, threshold=0)
Maximum likelihood estimates of three-parameter Weibull distribution
Description
Calculates the maximum likelihood estimates of three-parameter Weibull distribution.
Usage
weibull.mle(x, threshold, interval, interval.threshold, extendInt="downX",
a, tol = .Machine$double.eps^0.25, maxiter = 1000, trace = 0)
Arguments
x |
a numeric vector of observations. |
threshold |
the threshold parameter value. |
interval |
a vector containing the end-points of the interval to be estimated for the shape parameter. |
interval.threshold |
a vector containing the end-points of the interval to be estimated for the threshold parameter. |
extendInt |
character string specifying if the interval c(left,right) should be extended or directly produce an error when f() has no differing signs at the endpoints. The default, "downX", keep lowering the the left end of the interval so that f() has different signs. See |
a |
the offset fraction to be used; typically in (0,1). |
tol |
the desired accuracy (convergence tolerance). |
maxiter |
the maximum number of iterations. |
trace |
integer number; if positive, tracing information is produced. Higher values giving more details. |
Details
The three-parameter Weibull distribution has the cumulative distribution function
F(x) = 1 - \exp\Big[ - \Big( \frac{x-\theta}{\beta} \Big)^{\alpha} \Big],
where x>\theta
.
The shape (\alpha
) and scale (\beta
) parameters are estimated
using the maximum likelihood.
The maximum likelihood estimation is performed using the method by
Farnum and Booth (1997).
If the threshold
(\theta
) is missing, it is estimated by
weibull.threshold
.
If threshold=0
, then weibull.mle
calculates the maximum likelihood
estimates of the two-parameter Weibull distribution.
If interval
is missing, the interval is given by the method in
Farnum and Booth (1997).
If interval.threshold
is missing, the interval is initally given
by (min(x)-sd(x), min(x))
. If this interval does not include
the estimate, its lower bound is extended (see also uniroot
).
The choice of a
follows ppoints
function.
Convergence is declared either if f(x) == 0
or the change in x
for one step of the algorithm is less than
tol
(see also uniroot
).
If the algorithm does not converge in maxiter
steps,
a warning is printed and the current approximation is returned
(see also uniroot
).
Value
An object of class "weibull.estimate"
, a list with
two parameter estimates (if threshold
is given) or three-parameter estimates.
Author(s)
Chanseok Park
References
Park, C. (2018).
A Note on the Existence of the Location Parameter Estimate of the Three-Parameter Weibull Model Using the Weibull Plot.
Mathematical Problems in Engineering, 2018, 6056975.
doi: 10.1155/2018/6056975
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice,
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Farnum, N. R. and P. Booth (1997). Uniqueness of Maximum Likelihood Estimators of the 2-Parameter Weibull Distribution. IEEE Transactions on Reliability, 46, 523-525.
See Also
weibull.wp
for the parameter estimation using the Weibull plot.
weibull.rm
for robust parameter estimation using the repeated median method.
weibull.threshold
for the estimate of the threshold parameter.
fitdistr
for maximum-likelihood fitting of univariate distributions in package MASS.
Examples
# Three-parameter Weibull
data = c(355,725,884,462,1092,190,166,172,188,224,267,298,355,471,
154,101,76,811,80,249,752,305,301,386,667,212,186,127,
121,214,242,237,355,210,253,400,401,514,211,285)
weibull.mle(data)
# Two-parameter Weibull
weibull.mle(data, threshold=0)
Robust estimate of shape and scale parameters of Weibull using the repeated median method
Description
Calculates the estimates of the shape and scale parameters.
Usage
weibull.rm(x, a)
Arguments
x |
a numeric vector of observations. |
a |
the offset fraction to be used; typically in (0,1). See |
Details
weibull.rm
obtains the robust estimates of the shape and scale
parameters using the intercept and slope estimates using the repeated median method from the
Weibull plot.
Value
An object of class "weibull.estimate"
, a list with
two parameter estimates
Author(s)
Chanseok Park
References
Siegel, A. F. (1982). Robust Regression Using Repeated Medians. Biometrika, 69, 242-244.
See Also
weibull.mle
for the parameter estimation using the maximum likelihood method.
weibull.wp
for the parameter estimation using the Weibull plot.
fitdistr
for maximum-likelihood fitting of univariate distributions in package MASS.
Examples
data = c(355,725,884,462,1092,190,166,172,188,224,267,298,355,471,
154,101,76,811,80,249,752,305,301,386,667,212,186,127,
121,214,242,237,355,210,253,400,401,514,211,285)
weibull.rm(data)
Estimate of threshold parameter of three-parameter Weibull distribution
Description
Calculates the estimate of the threshold parameter.
Usage
weibull.threshold(x, a, interval.threshold, extendInt="downX")
Arguments
x |
a numeric vector of observations. |
a |
the offset fraction to be used; typically in (0,1). |
interval.threshold |
a vector containing the end-points of the interval to be estimated for the threshold parameter. |
extendInt |
character string specifying if the interval c(left,right) should be extended or directly produce an error when f() has no differing signs at the endpoints. The default, "downX", keep lowering the the left end of the interval so that f() has different signs. See |
Details
The three-parameter Weibull distribution has the cumulative distribution function
F(x) = 1 -\exp\Big[-\Big( \frac{x-\theta}{\beta}\Big)^{\alpha}\Big],
where x>\theta
.
The threshold parameter (\theta
) is estimated
by maximizing the correlation function from the Weibull plot.
The choice of a
follows ppoints
function.
If interval.threshold
is missing, the interval is initially given
by (min(x)-sd(x), min(x))
. If this interval does not include
the estimate, its lower bound is extended (see also uniroot
).
Value
weibull.threshold
returns a numeric value.
Author(s)
Chanseok Park
References
Park, C. (2018).
A Note on the Existence of the Location Parameter Estimate of the Three-Parameter Weibull Model Using the Weibull Plot.
Mathematical Problems in Engineering, 2018, 6056975.
doi: 10.1155/2018/6056975
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice,
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
See Also
weibull.mle
for the maximum likelihood estimate.
weibull.wp
for the parameter estimation using the Weibull plot.
Examples
# Data
data = c(355,725,884,462,1092,190,166,172,188,224,267,298,355,471,
154,101,76,811,80,249,752,305,301,386,667,212,186,127,
121,214,242,237,355,210,253,400,401,514,211,285)
weibull.threshold(data)
Estimate of shape and scale parameters of Weibull using the Weibull plot
Description
Calculates the estimates of the shape and scale parameters.
Usage
weibull.wp(x, n, a)
Arguments
x |
a numeric vector of observations. |
n |
The number of observations is needed if there is right-censoring. |
a |
the offset fraction to be used; typically in (0,1). See |
Details
weibull.wp
obtains the estimates of the shape and scale
parameters using the intercept and slope estimates from the
Weibull plot.
Value
An object of class "weibull.estimate"
, a list with
two parameter estimates
Author(s)
Chanseok Park
References
Park, C. (2018).
A Note on the Existence of the Location Parameter Estimate of the Three-Parameter Weibull Model Using the Weibull Plot.
Mathematical Problems in Engineering, 2018, 6056975.
doi: 10.1155/2018/6056975
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice, 24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
See Also
weibull.mle
for the parameter estimation using the maximum likelihood method.
weibull.rm
for robust parameter estimation using the repeated median method.
fitdistr
for maximum-likelihood fitting of univariate distributions in package MASS.
Examples
data = c(355,725,884,462,1092,190,166,172,188,224,267,298,355,471,
154,101,76,811,80,249,752,305,301,386,667,212,186,127,
121,214,242,237,355,210,253,400,401,514,211,285)
weibull.wp(data)
Weibull Plot
Description
wp.plot
produces a Weibull plot.
Usage
wp.plot(x, plot.it=TRUE, a, col.line="black", lty.line=1,
xlim=NULL, ylim=NULL, main=NULL, sub=NULL, xlab=NULL, ylab="Probability", ...)
Arguments
x |
a numeric vector of data values. Missing values are allowed. |
plot.it |
logical. Should the result be plotted? |
a |
the offset fraction to be used; typically in (0,1). See |
col.line |
the color of the straight line. |
lty.line |
the line type of the straight line. |
xlim |
the x limits of the plot. |
ylim |
the y limits of the plot. |
main |
a main title for the plot, see also |
sub |
a sub title for the plot. |
xlab |
a label for the x axis, defaults to a description of x. |
ylab |
a label for the y axis, defaults to "Probability". |
... |
graphical parameters. |
Details
The Weibull plot is based on taking the logarithm of the Weibull cumulative distribution function twice. The horizontal axis is logarithmic.
Value
A list with the following components:
x |
The sorted data |
y |
log(-log(1-ppoints(n,a=a))) |
Author(s)
Chanseok Park
See Also
plot
, qqnorm
, qqplot
, iwp.plot
, ep.plot
.
bs.plot
for the Birnbaum-Saunders probability plot in package bsgof.
Examples
attach(Wdata)
wp.plot(bearings)
# With cosmetic lines
wp.plot(bearings, main="Weibull Plot", col.line="red",
xlab="Lifetimes of bearings", lty.line=1, pch=3)
hline = log(-log(1- c( (1:5)/100, (1:9)/10) ))
abline( h=hline, col=gray(0.1), lty=3, lwd=0.5 )
abline( v=seq(15, 200,by=5), col=gray(0.1), lty=3, lwd=0.5 )
Weibullness Test from a Weibull Plot
Description
Performs the statistical test of Weibullness (Goodness-of-fit test for the Weibull distribution) using the sample correlation from the Weibull plot.
Usage
wp.test(x, a)
Arguments
x |
a numeric vector of data values. Missing values are allowed, but the number of non-missing values must be between 3 and 1000. |
a |
the offset fraction to be used; typically in (0,1). See ppoints(). |
Details
The Weibullness test is constructed using the sample correlation
which is calculated using the associated Weibull plot.
The critical value is then looked up in Weibull.Plot.Quantiles.
There is print
method for class "htest"
.
Value
A list with class "htest" containing the following components:
statistic |
the value of the test statistic (sample correlation from the Weibull plot) |
p.value |
the p-value for the test. |
sample.size |
sample size (missing observations are deleted). |
method |
a character string indicating the Weibullness test. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Chanseok Park
References
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice,
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
Examples
# For Weibullness hypothesis test.
attach(Wdata)
wp.test(urinary)
Critical Value for the Weibullness Test
Description
Calculates the critical value for the Weibullness test
Usage
wp.test.critical(alpha, n)
Arguments
alpha |
the significance level. |
n |
the sample size. |
Details
This function calculates the critical value for the Weibullness test
which is constructed using the sample correlation
from the associated Weibull plot.
The critical value is then looked up in Weibull.Plot.Quantiles.
There is print
method for class "wp.test.critical"
.
Value
A list with class "wp.test.critical"
containing the following components:
sample.size |
sample size (missing observations are deleted). |
alpha |
significance level. |
critical.value |
critical value. |
data.name |
a character string giving the name(s) of the data. |
Author(s)
Chanseok Park
References
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice,
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
Examples
# Critical value with alpha (significance level) and n (sample size).
wp.test.critical(alpha=0.01, n=10)
The p-value for the Weibullness Test
Description
Calculates the p-value for the Weibullness test which is based on the sample correlation from the Weibull plot.
Usage
wp.test.pvalue(r, n)
Arguments
r |
the sample correlation coefficient from the Weibull plot; r is in (0,1). |
n |
the sample size. |
Details
The p-value for the Weibullness test which is based on
the sample correlation from the Weibull plot.
There is print
method for class "htest"
.
Value
A list with class "htest" containing the following components:
statistic |
the value of the test statistic (sample correlation from the Weibull plot) |
p.value |
the p-value for the test. |
method |
a character string indicating the Weibullness test. |
Author(s)
Chanseok Park
References
Park, C. (2017).
Weibullness test and parameter estimation of the three-parameter
Weibull model using the sample correlation coefficient.
International Journal of Industrial Engineering - Theory,
Applications and Practice,
24(4), 376-391.
doi: 10.23055/ijietap.2017.24.4.2848
Vogel, R. M. and C. N. Kroll (1989). Low-Flow Frequency Analysis Using Probability-Plot Correlation Coefficients. Journal of Water Resources Planning and Management, 115, 338-357.
See Also
ks.test
for performing the Kolmogorov-Smirnov test
for the goodness of fit test of two samples.
shapiro.test
for performing the Shapiro-Wilk test for normality.
Examples
# p.value with r (sample correlation from the Weibull plot) and n (sample size).
wp.test.pvalue(r=0.6, n=10)