pp | 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 i
th ascending data value. The parameter a
specifies the plotting-position type, and n
is the sample size (length(x)
). Alternatively, the plotting positions can be computed by
pp_i = \frac{i+A}{n+B} \mbox{,}
where A
and B
can obviously be expressed in terms of a
for B > A > -1
(Hosking and Wallis, 1997, sec. 2.8).
pp(x, A=NULL, B=NULL, a=0, sort=TRUE, ties.method="first", ...)
x |
A vector of data values. The vector is used to get sample size through |
A |
A value for the plotting-position coefficient |
B |
A value for the plotting-position coefficient |
a |
A value for the plotting-position formula from which |
sort |
A logical whether the ranks of the data are sorted prior to |
ties.method |
This is the argument of the same name passed to |
... |
Additional arguments to pass. |
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.
a=0
, Unbiased exceedance probability for all distributions (see discussion in pp.f
).
a=0.3175
, Median exceedance probabilities for all distributions (if so, see pp.median
).
\approx 0.35
, Often used with probability-weighted moments.
a=0.375
, Nearly unbiased quantiles for normal distribution.
a=0.40
, Approximately quantile unbiased.
a=0.44
, Optimized for Gumbel distribution.
a=0.50
, A traditional choice.
The function uses the R rank
function, which has specific settings to handle tied data. For implementation here, the ties.method="first"
method to rank
is used. The user has flexibility in changing this to their own custom purposes.
W.H. Asquith
Hosking, J.R.M., and Wallis, J.R., 1997, Regional frequency analysis—An approach based on L-moments: Cambridge University Press.
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.
nonexceeds
, pwm.pp
, pp.f
, pp.median
, headrick.sheng.lalpha
Q <- rnorm(20)
PP <- pp(Q)
plot(PP, sort(Q))
Q <- rweibull(30, 1.4, scale=400)
WEI <- parwei(lmoms(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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.