Skip to contents

The Inverse Weibull distribution

Usage

IW(mu.link = "log", sigma.link = "log")

Arguments

defines the mu.link, with "log" link as the default for the mu parameter.

defines the sigma.link, with "log" link as the default for the sigma.

Value

Returns a gamlss.family object which can be used to fit a IW distribution in the gamlss() function.

Details

The Inverse Weibull distribution with parameters mu, sigma has density given by

\(f(x) = \mu \sigma x^{-\sigma-1} \exp(-\mu x^{-\sigma})\)

for \(x > 0\), \(\mu > 0\) and \(\sigma > 0\)

References

Almalki SJ, Nadarajah S (2014). “Modifications of the Weibull distribution: A review.” Reliability Engineering & System Safety, 124, 32–55. doi:10.1016/j.ress.2013.11.010 .

Drapella A (1993). “The complementary Weibull distribution: unknown or just forgotten?” Quality and Reliability Engineering International, 9(4), 383–385.

See also

Author

Freddy Hernandez, fhernanb@unal.edu.co

Examples

# Example 1
# Generating some random values with
# known mu and sigma
y <- rIW(n=100, mu=1, sigma=2)

# Fitting the model
require(gamlss)
mod <- gamlss(y~1, mu.fo=~1, sigma.fo=~1, family="IW")
#> GAMLSS-RS iteration 1: Global Deviance = 238.9945 
#> GAMLSS-RS iteration 2: Global Deviance = 236.7443 
#> GAMLSS-RS iteration 3: Global Deviance = 236.712 
#> GAMLSS-RS iteration 4: Global Deviance = 236.7113 

# Extracting the fitted values for mu, sigma and nu
# using the inverse link function
exp(coef(mod, what="mu"))
#> (Intercept) 
#>   0.9218022 
exp(coef(mod, what="sigma"))
#> (Intercept) 
#>    1.982543 

# Example 2
# Generating random values under some model
n <- 100
x1 <- runif(n)
x2 <- runif(n)
mu <- exp(2 + -1 * x1)
sigma <- exp(2 - 2 * x2)
y <- rIW(n=n, mu=mu, sigma=sigma)

mod <- gamlss(y~x1, mu.fo=~1, sigma.fo=~x2, family=IW)
#> GAMLSS-RS iteration 1: Global Deviance = 319.9008 
#> GAMLSS-RS iteration 2: Global Deviance = 291.2513 
#> GAMLSS-RS iteration 3: Global Deviance = 287.6957 
#> GAMLSS-RS iteration 4: Global Deviance = 287.1803 
#> GAMLSS-RS iteration 5: Global Deviance = 287.1027 
#> GAMLSS-RS iteration 6: Global Deviance = 287.0917 
#> GAMLSS-RS iteration 7: Global Deviance = 287.0898 
#> GAMLSS-RS iteration 8: Global Deviance = 287.0893 

coef(mod, what="mu")
#> (Intercept)          x1 
#>   1.7839698  -0.6082608 
coef(mod, what="sigma")
#> (Intercept)          x2 
#>    2.048303   -2.143561 

# Example 3
# Using the dataset from Kundu and Howlader (2010) Bayesian inference and 
# prediction of the inverse Weibull distribution for Type-II censored data

y <- c(12, 15, 22, 24, 24, 32, 32, 33, 34, 38, 38, 43, 44, 48, 52, 
       53, 54, 54, 55, 56, 57, 58, 58, 59, 60, 60, 60, 60, 61, 62, 
       63, 65, 65, 67, 68, 70, 70, 72, 73, 75, 76, 76, 81, 83, 84, 
       85, 87, 91, 95, 96, 98, 99, 109, 110, 121, 127, 129, 131, 
       143, 146, 146, 175, 175, 211, 233, 258, 258, 263, 297, 341, 
       341, 376)

y <- y / 1000

mod <- gamlss(y~1, mu.fo=~1, sigma.fo=~1, family="IW",
              control=gamlss.control(n.cyc=5000, trace=FALSE))
exp(coef(mod, what="mu"))
#> (Intercept) 
#>  0.01697898 
exp(coef(mod, what="sigma"))
#> (Intercept) 
#>    1.400635