pp {lmomco} | R Documentation |
The plotting positions of a data vector (x
) are returned in ascending order. The plotting-position formula is
pp_i = frac{i-a}{n+1-2a} mbox{,}
where pp_i is the nonexceedance probability F of the ith ascending
data value. The parameter a specifies the plotting-position type, and n is the sample size (length(x)
).
pp(x, a=0, sort=TRUE)
x |
A vector of data values. The vector is used to get sample size through length() ; |
a |
A value for the plotting-position formula, default is A=0 , which returns the Weibull plotting positions; and |
sort |
A logical whether the ranks of the data are sorted prior to F computation. |
An R vector
is returned.
Various plotting positions have been suggested in the literature. Stedinger and others (1992, p. 18.25) comment that "all plotting positions give crude estimates of the unknown [non]exceedance probabilities associated with the largest (and smallest) events." The various plotting positions are summarized in the follow table.
The function uses the rank()
function, which has specific settings to handle tied data. For implementation here, the ties.method="first"
method to rank()
is used.
W.H. Asquith
Stedinger, J.R., Vogel, R.M., and Foufoula-Georgiou, E., 1992, Frequency analysis of extreme events, in Handbook of Hydrology, chapter 18, editor-in-chief D. A. Maidment: McGraw-Hill, New York.
Q <- rnorm(20) PP <- pp(Q) plot(PP,sort(Q)) Q <- rweibull(30,1.4,scale=400) WEI <- parwei(lmom.ub(Q)) PP <- pp(Q) plot(PP,sort(Q)) lines(PP,quawei(PP,WEI)) # This plot looks similar, but when connecting lines are added # the nature of the sorting is obvious. plot(pp(Q,sort=FALSE), Q) lines(pp(Q,sort=FALSE), Q, col=2)