Title: | Goodness-of-Fit Test for Weibull Distribution (Weibullness) |
---|---|
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). |
Authors: | Chanseok Park [aut, cre] |
Maintainer: | Chanseok Park <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 1.24.1 |
Built: | 2024-11-01 11:14:52 UTC |
Source: | https://github.com/appliedstat/r |
ep.plot
produces a exponential probability plot.
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", ...)
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", ...)
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. |
The exponential probability plot is based on taking the logarithm of the exponential cumulative distribution function.
A list with the following components:
x |
The sorted data |
y |
-log(1-ppoints(n,a=a)) |
Chanseok Park
plot
, qqnorm
, qqplot
, wp.plot
, iwp.plot
. bs.plot
for the Birnbaum-Saunders probability plot in package bsgof.
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 )
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 )
Performs Goodness-of-fit test for the exponential distribution using the sample correlation from the exponential probability plot.
ep.test(x, a)
ep.test(x, a)
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(). |
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"
.
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. |
Chanseok Park
Shapiro, S. S. and M. B. Wilk (1972). An Analysis of Variance Test for the Exponential Distribution (Complete Samples). Technometrics, 14(2), 355-370.
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.
# 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)
# 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)
Calculates the critical value for the Weibullness test
ep.test.critical(alpha, n)
ep.test.critical(alpha, n)
alpha |
the significance level. |
n |
the sample size. |
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"
.
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. |
Chanseok Park
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.
# Critical value with alpha (significance level) and n (sample size). ep.test.critical(alpha=0.0982, n=7)
# Critical value with alpha (significance level) and n (sample size). ep.test.critical(alpha=0.0982, n=7)
Calculates the p-value for the exponential goodness-of-fit test which is based on the sample correlation from the exponential probability plot.
ep.test.pvalue(w, n)
ep.test.pvalue(w, n)
w |
the ANOVA test statistic; w is in (0,1). |
n |
the sample size. |
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"
.
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. |
Chanseok Park
Shapiro, S. S. and M. B. Wilk (1972). An Analysis of Variance Test for the Exponential Distribution (Complete Samples). Technometrics, 14(2), 355-370.
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.
# p.value with w (ANOVA statistic) and n (sample size). ep.test.pvalue(w=0.35593, n=7)
# p.value with w (ANOVA statistic) and n (sample size). ep.test.pvalue(w=0.35593, n=7)
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.
Exponential.ANOVA.Quantiles
Exponential.ANOVA.Quantiles
This data frame contains 998 rows and 1001 columns.
gp.plot
produces a Gumbel probability plot.
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", ...)
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", ...)
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. |
The Gumbel probability plot is based on taking the logarithm of the Gumbel cumulative distribution function twice.
A list with the following components:
x |
The sorted data |
y |
-log(-log(ppoints(n,a=a))) |
Chanseok Park
plot
, qqnorm
, qqplot
, wp.plot
, iwp.plot
, ep.plot
. bs.plot
for the Birnbaum-Saunders probability plot in package bsgof.
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 )
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 )
Performs the statistical goodness-of-fit test for the Gumbel distribution using the sample correlation from the Gumbel probability plot.
gp.test(x, a)
gp.test(x, a)
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(). |
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"
.
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. |
Chanseok Park
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.
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.
# 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)
# 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)
Calculates the critical value for the Gumbel goodness-of-fit test
gp.test.critical(alpha, n)
gp.test.critical(alpha, n)
alpha |
the significance level. |
n |
the sample size. |
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"
.
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. |
Chanseok Park
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.
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.
# Critical value with alpha (significance level) and n (sample size). gp.test.critical(alpha=0.01, n=10)
# Critical value with alpha (significance level) and n (sample size). gp.test.critical(alpha=0.01, n=10)
Calculates the p-value for the Gumbel goodness-of-fit test which is based on the sample correlation from the Gumbel probability plot.
gp.test.pvalue(r, n)
gp.test.pvalue(r, n)
r |
the sample correlation coefficient from the Gumbel probability plot; r is in (0,1). |
n |
the sample size. |
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"
.
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. |
Chanseok Park
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.
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.
# p.value with r (sample correlation from the Gumbel probability plot) and n (sample size). gp.test.pvalue(r=0.98504, n=10)
# p.value with r (sample correlation from the Gumbel probability plot) and n (sample size). gp.test.pvalue(r=0.98504, n=10)
Calculates the estimates of the location and scale parameters fromn the Gumbel probability plot.
gumbel.gp(x, n, a)
gumbel.gp(x, n, a)
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 |
gumbel.gp
obtains the estimates of the location and scale
parameters using the intercept and slope estimates from the
Gumbel probability plot.
An object of class "gumbel.estimate"
, a list with
two parameter estimates
Chanseok Park
weibull.wp
for the parameter estimation using the Weibull plot.
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)
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)
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.
Gumbel.Plot.Quantiles
Gumbel.Plot.Quantiles
This data frame contains 998 rows and 1001 columns.
Density function, distribution function, quantile function, random generation,
raw moments and limited moments for the Inverse Weibull distribution
with parameters shape
and scale
.
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)
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)
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 |
The probability density function of the inverse Weibull distribution with parameters shape
and
scale
is given by
where ,
and
.
The cumulative distribution function is given by
dinvweibull
gives the density, pinvweibull
gives the distribution function,
qinvweibull
gives the quantile function, and rinvweibull
generates random deviates.
Chanseok Park
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 )
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 )
Calculates the maximum likelihood estimates of the two-parameter Weibull distribution.
invweibull.mle(x, interval, tol = .Machine$double.eps^0.25, maxiter = 1000, trace = 0)
invweibull.mle(x, interval, tol = .Machine$double.eps^0.25, maxiter = 1000, trace = 0)
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. |
The two-parameter inverse Weibull distribution has the cumulative distribution function
where ,
and
.
The shape () and scale (
) 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
).
An object of class "weibull.estimate"
, a list with
two parameter estimates.
Chanseok Park
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.
# 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)
# 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)
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.
IW.Plot.Quantiles
IW.Plot.Quantiles
This data frame contains 998 rows and 1001 columns.
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
iwp.plot
produces an inverse Weibull probability plot.
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", ...)
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", ...)
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. |
The inverse Weibull probability plot is based on taking the logarithm of the inverse Weibull cumulative distribution function twice.
A list with the following components:
x |
The sorted data |
y |
-log(-log(ppoints(n,a=a))) |
Chanseok Park
plot
, qqnorm
, qqplot
, wp.plot
.
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 )
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 )
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.
iwp.test(x, a)
iwp.test(x, a)
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(). |
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"
.
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. |
Chanseok Park
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.
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.
# For inverse Weibullness hypothesis test. attach(Wdata) iwp.test(urinary)
# For inverse Weibullness hypothesis test. attach(Wdata) iwp.test(urinary)
Calculates the critical value for the inverse Weibullness test
iwp.test.critical(alpha, n)
iwp.test.critical(alpha, n)
alpha |
the significance level. |
n |
the sample size. |
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"
.
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. |
Chanseok Park
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.
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.
# Critical value with alpha (significance level) and n (sample size). iwp.test.critical(alpha=0.01, n=10)
# Critical value with alpha (significance level) and n (sample size). iwp.test.critical(alpha=0.01, n=10)
Calculates the p-value for the inverse Weibullness test which is based on the sample correlation from the inverse Weibull plot.
iwp.test.pvalue(r, n)
iwp.test.pvalue(r, n)
r |
the sample correlation coefficient from the Weibull plot; r is in (0,1). |
n |
the sample size. |
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"
.
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. |
Chanseok Park
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.
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.
# p.value with r (sample correlation from the inverse Weibull plot) and n (sample size). iwp.test.pvalue(r=0.6, n=10)
# p.value with r (sample correlation from the inverse Weibull plot) and n (sample size). iwp.test.pvalue(r=0.6, n=10)
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.
Wdata
Wdata
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.
# Attach datasets attach(Wdata) bearings glassfiber1.5 glassfiber15 urinary radiotherapy radio.chemotherapy
# Attach datasets attach(Wdata) bearings glassfiber1.5 glassfiber15 urinary radiotherapy radio.chemotherapy
Calculates the maximum likelihood estimates with interval censoring using the EM Algorithm.
weibull.ic(X, start=c(1,1), maxits=10000, eps=1E-5)
weibull.ic(X, start=c(1,1), maxits=10000, eps=1E-5)
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). |
The expectation-maximization(EM) algorithm is used for estimating the parameters with interval-censored data.
Calculates the maximum likelihood estimates with interval-censored data
Chanseok Park
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.
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.
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)
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)
Calculates the maximum likelihood estimates of three-parameter Weibull distribution.
weibull.mle(x, threshold, interval, interval.threshold, extendInt="downX", a, tol = .Machine$double.eps^0.25, maxiter = 1000, trace = 0)
weibull.mle(x, threshold, interval, interval.threshold, extendInt="downX", a, tol = .Machine$double.eps^0.25, maxiter = 1000, trace = 0)
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. |
The three-parameter Weibull distribution has the cumulative distribution function
where .
The shape (
) and scale (
) parameters are estimated
using the maximum likelihood.
The maximum likelihood estimation is performed using the method by
Farnum and Booth (1997).
If the
threshold
() 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
).
An object of class "weibull.estimate"
, a list with
two parameter estimates (if threshold
is given) or three-parameter estimates.
Chanseok Park
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.
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.
# 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)
# 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)
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.
Weibull.Plot.Quantiles
Weibull.Plot.Quantiles
This data frame contains 998 rows and 1001 columns.
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
Calculates the estimates of the shape and scale parameters.
weibull.rm(x, a)
weibull.rm(x, a)
x |
a numeric vector of observations. |
a |
the offset fraction to be used; typically in (0,1). See |
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.
An object of class "weibull.estimate"
, a list with
two parameter estimates
Chanseok Park
Siegel, A. F. (1982). Robust Regression Using Repeated Medians. Biometrika, 69, 242-244.
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.
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)
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)
Calculates the estimate of the threshold parameter.
weibull.threshold(x, a, interval.threshold, extendInt="downX")
weibull.threshold(x, a, interval.threshold, extendInt="downX")
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 |
The three-parameter Weibull distribution has the cumulative distribution function
where .
The threshold parameter (
) 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
).
weibull.threshold
returns a numeric value.
Chanseok Park
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
weibull.mle
for the maximum likelihood estimate.
weibull.wp
for the parameter estimation using the Weibull plot.
# 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)
# 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)
Calculates the estimates of the shape and scale parameters.
weibull.wp(x, n, a)
weibull.wp(x, n, a)
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 |
weibull.wp
obtains the estimates of the shape and scale
parameters using the intercept and slope estimates from the
Weibull plot.
An object of class "weibull.estimate"
, a list with
two parameter estimates
Chanseok Park
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
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.
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)
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)
wp.plot
produces a Weibull plot.
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", ...)
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", ...)
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. |
The Weibull plot is based on taking the logarithm of the Weibull cumulative distribution function twice. The horizontal axis is logarithmic.
A list with the following components:
x |
The sorted data |
y |
log(-log(1-ppoints(n,a=a))) |
Chanseok Park
plot
, qqnorm
, qqplot
, iwp.plot
, ep.plot
. bs.plot
for the Birnbaum-Saunders probability plot in package bsgof.
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 )
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 )
Performs the statistical test of Weibullness (Goodness-of-fit test for the Weibull distribution) using the sample correlation from the Weibull plot.
wp.test(x, a)
wp.test(x, a)
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(). |
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"
.
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. |
Chanseok Park
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.
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.
# For Weibullness hypothesis test. attach(Wdata) wp.test(urinary)
# For Weibullness hypothesis test. attach(Wdata) wp.test(urinary)
Calculates the critical value for the Weibullness test
wp.test.critical(alpha, n)
wp.test.critical(alpha, n)
alpha |
the significance level. |
n |
the sample size. |
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"
.
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. |
Chanseok Park
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.
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.
# Critical value with alpha (significance level) and n (sample size). wp.test.critical(alpha=0.01, n=10)
# Critical value with alpha (significance level) and n (sample size). wp.test.critical(alpha=0.01, n=10)
Calculates the p-value for the Weibullness test which is based on the sample correlation from the Weibull plot.
wp.test.pvalue(r, n)
wp.test.pvalue(r, n)
r |
the sample correlation coefficient from the Weibull plot; r is in (0,1). |
n |
the sample size. |
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"
.
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. |
Chanseok Park
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.
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.
# p.value with r (sample correlation from the Weibull plot) and n (sample size). wp.test.pvalue(r=0.6, n=10)
# p.value with r (sample correlation from the Weibull plot) and n (sample size). wp.test.pvalue(r=0.6, n=10)