ptailw {distTails} | R Documentation |
TailW Probability Function
Description
This function computes the cumulative density function of the tailW with the input sample data.
F(x,\alpha,\beta,\nu)=1-\exp(-\alpha(x+\nu)^\beta+\alpha\nu^\beta).
Usage
ptailw(x, threshold, scale, shape)
Arguments
x |
Sample data. |
threshold |
Minimum value of the tail. |
scale |
Scale parameter. |
shape |
Shape parameter. |
Value
Gives the distribution function of the TailW. The length of the result is determined by the length of x.
Examples
# Using the probability function to show the fitting.
samp <- rtailw(1000, 1, 2, 3)
emp_cdf <- ecdf(samp)(samp)
pars <- fittail(samp, dist = "TailW")
x_seq <- seq(min(samp), max(samp), length.out = 250)
p <- ptailw(x_seq, threshold = 1, scale = pars$scale, shape = pars$shape)
plot(samp, 1-emp_cdf, log = "y")
lines(x_seq, 1-p, col = "red")
[Package distTails version 0.1.2 Index]