Determine quantiles across ensembles of x and/or y, as a function of x, using interpolation

quantile2d(
  x,
  y,
  n.bins = 500,
  x.bin = NA,
  probs = c(0.025, 0.25, 0.5, 0.75, 0.975),
  n.ens = max(c(ncol(x), ncol(y))),
  seed = 111,
  limit.outliers.x = 0.0025
)

Arguments

x

n by m matrix where n is the number of observations and m is >= 1

y

n by j matrix where n is the number of observations and j is >= 1

n.bins

number bins over which to calculate intervals. Used to calculate x.bin if not provided.

x.bin

vector of bin edges over which to bin.

probs

quantiles to calculate

n.ens

how many ensemble members?

seed

set a seed for reproducibility

limit.outliers.x

limit the plotting of outliers on the x axis to exclude values below this probability limit (default = 0.025)

Value

list of quantiles and x.bin

Author

Nick McKay

Examples

if (FALSE) { # \dontrun{
quantiles <- quantile2d(ageEnsemble,paleoEnsemble)
} # }