Helper to estimate quantile functions from data for NORTA
quantile_functions_from_data(
data,
method_density = "linear",
n_density = 200,
method_quantile = "constant",
probs_quantile = seq(0, 1, 0.01),
n_small = 10,
use_quantile = c(),
...
)quantile_function_from_density(
x,
method_density = "linear",
n_density = 200,
...
)
quantile_function_from_quantiles(
x,
method_quantile = "constant",
probs_quantile = seq(0, 1, 0.01)
)
A named list of functions with length ncol(data)
giving the quantile
functions of the input data. Each entry is a function returned from
stats::approxfun
.
A matrix or data.frame for which quantile function should be estimated.
Interpolation method used for density based quantile functions,
passed to stats::approxfun
. See Details.
Number of points at which the density is estimated for density bsed
quantile, functions, passed to stats::density
.
Interpolation method used for quantile based quantile functions,
passed to stats::approxfun
. See Details.
Specification of quantiles to be estimated from data for quantile based
quantile functions, passed to stats::quantile
.
See Details.
An integer giving the number of distinct values below which quantile
functions are estimated using quantile_function_from_quantiles()
(more
suited for categorical data), rather than quantile_function_from_density()
.
A vector of names indicating columns for which the quantile function
should be estimated using quantile_function_from_quantiles()
. Overrides
n_small
.
Passed to quantile_function_from_density()
.
Single vector representing variable input to quantile_function_from_density()
or quantile_function_from_quantiles()
.
The NORTA approach requires the specification of the marginals by quantile functions. This helper estimates those given a dataset automatically and non-parametrically. There are two ways implemented to estimate quantile functions from data.
Estimate the quantile function by interpolating the observed
quantiles from the data. This is most useful for categorical data, when
the interpolation is using a step-function (default). Implemented in
quantile_function_from_quantiles()
.
Estimate the quantile function via the the empirical cumulative
density function derived from the density of the data. Since the density
is only estimated at specific points, any values in between are interpolated
linearly (default, other options are possible). This is most useful for
continuous data. Implemented in quantile_function_from_density()
.
simdesign_norta