Learn R Programming

lmomco (version 1.7.3)

z.par2qua: Quantile Function of the Blipped Distributions

Description

This function acts as a front end or dispatcher to the distribution-specific quantile functions. $$F(x) = 0$$ for $x \le 0$ and $$F(x) = p + (1-p)G(x)$$ for $x > 0$.

Usage

z.par2qua(f,p,para,z=0,...)

Arguments

f
Nonexceedance probability ($0 \le F \le 1$).
p
Nonexceedance probability of z value.
para
The parameters from lmom2par or similar.
z
Threshold value.
...
The additional arguments are passed to the quantile function such as paracheck = FALSE for the Generalized Lambda distribution (quagld).

Value

  • Quantile value for $f$.

See Also

z.par2cdf, par2qua

Examples

Run this code
# define the real parent (or close)
the.gpa <- vec2par(c(100,1000,0.1),type='gpa')
fake.data <- rlmomco(30,the.gpa) # simulate some data
fake.data <- sort(c(fake.data,0,0,0,0)) # add of zero observations

# next compute the parameters for the positive data
gpa <- pargpa(lmoms(fake.data[fake.data > 0]))
n <- length(fake.data) # sample size
p <- length(fake.data[fake.data == 0])/n # est. prob of zero value
F <- nonexceeds() # handy values
PP <- pp(fake.data) # compute plotting positions of sim. sample

plot(PP,fake.data,ylim=c(0,5000)) # plot the sample
lines(F,quagpa(F,the.gpa)) # the parent (without zeros)
lines(F,z.par2qua(F,p,gpa),lwd=3) # fitted model with zero conditional

# now repeat the above code over and over again and watch the results

Run the code above in your browser using DataLab