dtailw: TailW Density function

Description Usage Arguments Value References Examples

View source: R/weibull-density.R

Description

This function computes the density of the tailW with the input sample data. The expression for the density used is:

f(x, α, β, ν) = α β (x + ν)^{β -1} \exp(-α(x + ν)^{β} + α ν^{β})

Usage

1
dtailw(x, threshold, scale, shape)

Arguments

x

Sample data.

threshold

Minimum value of the tail.

scale

Scale parameter.

shape

Shape parameter.

Value

Gives the density of the TailW. The length of the result is determined by the length of x.

References

Vilardell, Sergi & Serra, Isabel & Abella, Jaume & del Castillo, Joan & Cazorla, Francisco. (2019). Software Timing Analysis for Complex Hardware with Survivability and Risk Analysis. 227-236. <doi:10.1109/ICCD46524.2019.00036>.

Examples

1
2
3
4
5
6
7
8
9
# Generate random deviates from a weibull tail and plot the theoretical density.
scale <- 2
shape <- 1
threshold <- 1
x_seq <- seq(threshold, 5, length.out = 500)
theo_density <- dtailw(x_seq, threshold = threshold, scale = scale, shape = shape)
sample <- rtailw(500, threshold = threshold, scale = scale, shape = shape)
hist(sample, probability = TRUE)
lines(x = x_seq, y = theo_density, col = "red")

SergiVilardell/distributionTails documentation built on Jan. 17, 2021, 8:44 a.m.