Converts a numeric vector to its rank-based scores. For uscore()
(uniform scores), values become roughly equally spaced between 0 and 1,
keeping their order. nscore() calculates normal scores by
spacing the uniform scores along a standard
normal distribution; rpscore() calculates empirical return periods
by spacing the uniform scores u by 1 / (1 - u).
uscore(x, pos = "Hazen", na.rm = FALSE)nscore(x, pos = "Hazen", na.rm = FALSE)
rpscore(x, pos = "Hazen", na.rm = FALSE)
Vector of uniform scores corresponding to values in x.
Numeric vector.
Positional adjustment for uniform scores. See Details. Can be a single numeric, or could be named after one of the proponents behind a choice of the numeric: "Weibull", "Beard", "Gringorten", or "Hazen".
Logical indicating whether NA and NaN values should be
removed from the output.
Thanks to Dr. Harry Joe for providing a starting framework for
the uscore() function.
Uniform scores are calculated by (rank+a)/(n+1+2*a),
where rank is the ranked x values, and a is the positional
adjustment pos. Alternatively, could be named after an individual
associated with a choice of a:
Weibull (1939) proposed a = 0.
Beard (1943) proposed a = -0.31.
Gringorten (1963) proposed a = -0.44.
Hazen (1914) proposed a = -0.5.
Beard, L. R. (1943). Statistical analysis in hydrology. Transactions of the American Society of Civil Engineers, 108, 1110–1160.
Gringorten, I. I. (1963). A plotting rule for extreme probability paper. Journal of Geophysical Research, 68(3), 813–814.
Hazen, A. (1914). Storage to be provided in impounding reservoirs for municipal water supply. Transactions of the American Society of Civil Engineers, 77, 1539–1640.
Weibull, W. (1939). A statistical theory of the strength of materials. IVB-Handl., 151.
x <- c(0.3, 0.56, NA, 0.1, -12)
uscore(x)
uscore(x, pos = "Gringorten")
nscore(x, pos = -0.4)
rpscore(x)
Run the code above in your browser using DataLab