ptailw {distTails} | R Documentation |
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).
ptailw(x, threshold, scale, shape)
x |
Sample data. |
threshold |
Minimum value of the tail. |
scale |
Scale parameter. |
shape |
Shape parameter. |
Gives the distribution function of the TailW. The length of the result is determined by the length of x.
# 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")