Shift, shape and scale parameters. Vectors of length > 1 are not
accepted.
log
Logical; if TRUE, the log density is returned.
lower.tail
Logical; if TRUE (default), probabilities are
Pr[X <= x], otherwise,
Pr[X > x].
Details
The SLTW distribution function with shape α > 0, scale
β > 0 and shift δ > 0 has survival function
S(y) = exp{- [(y + δ)/β]^α + [δ/β]^α}
(y > 0)
This distribution is that of Y := X - δ conditional to
X > δ where X follows a Weibull distribution with
shape α and scale β.
The hazard and mean residual life (MRL) are monotonous functions with
the same monotonicity as their Weibull equivalent (with the same shape
and scale). The moments or even expectation do not have simple
expression.
This distribution is sometimes called power exponential. It is
occasionally used in POT with the shift delta taken as the
threshold as it should be when the distribution for the level X
(and not for the exceedance Y) is known to be the standard
Weibull distribution.
Value
dSLTW gives the density
function, pSLTW gives the distribution function, qSLTW
gives the quantile function, and rSLTW generates random
deviates.
See Also
Lomax for the Lomax distribution which is a limit case
of SLTW.
Examples
shape <- rexp(1)+1
delta = 10
xl <- qSLTW(c(0.001, 0.99), delta = delta, shape = shape)
x <- seq(from = xl[1], to = xl[2], length.out = 200)
f <- dSLTW(x, delta = delta, shape = shape)
plot(x, f, type = "l", main = "SLTW density")
F <- pSLTW(x, delta = delta, shape = shape)
plot(x, F, type = "l", main = "SLTW distribution")
X <- rSLTW(5000, delta = delta, shape = shape)
## Should be close to the uniform repartition
plot(ecdf(pSLTW(X, delta = delta, shape = shape)))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Renext)
Loading required package: evd
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Renext/SLTW.Rd_%03d_medium.png", width=480, height=480)
> ### Name: SLTW
> ### Title: Shifted Left Truncated Weibull (SLTW) distribution
> ### Aliases: SLTW dSLTW pSLTW qSLTW rSLTW
> ### Keywords: distribution
>
> ### ** Examples
>
> shape <- rexp(1)+1
> delta = 10
>
> xl <- qSLTW(c(0.001, 0.99), delta = delta, shape = shape)
> x <- seq(from = xl[1], to = xl[2], length.out = 200)
> f <- dSLTW(x, delta = delta, shape = shape)
> plot(x, f, type = "l", main = "SLTW density")
>
> F <- pSLTW(x, delta = delta, shape = shape)
> plot(x, F, type = "l", main = "SLTW distribution")
>
> X <- rSLTW(5000, delta = delta, shape = shape)
> ## Should be close to the uniform repartition
> plot(ecdf(pSLTW(X, delta = delta, shape = shape)))
>
>
>
>
>
>
> dev.off()
null device
1
>