This package is being phased out and replaced by gristmill
The goal of uscore is to calculate empirical-based scores from data.
uscore()essentially fits data so they are equally spaced between 0 and 1.nscore()spaces data along a standard Normal distribution.rpscore()calculates empirical return periods.
You can install the development version of uscore like so:
remotes::install_github("probaverse/uscore")Consider a numeric vector:
library(uscore)
x <- c(0.3, 0.56, NA, 0.1, -12)Uniform scores:
uscore(x)
#> [1] 0.625 0.875 NA 0.375 0.125Normal scores:
nscore(x)
#> [1] 0.3186394 1.1503494 NA -0.3186394 -1.1503494Empirical return periods:
rpscore(x)
#> [1] 2.666667 8.000000 NA 1.600000 1.142857