Mirrors the Numerics LinearFunction (Y = alpha + beta*X + epsilon) and PowerFunction
(Y = alpha * (X - xi)^beta * epsilon), both over optional normally distributed noise
(epsilon ~ Normal(0, sigma)) via confidence_level. is_inverse (PowerFunction's own
IsInverse switch) selects which of the forward power law or its algebraic inverse
Function()/inverse = TRUE evaluates – an independent axis from inverse itself, which
picks Function() vs. InverseFunction() on whichever of the two is_inverse selects.
Usage
univariate_function(
type,
parameters,
x,
inverse = FALSE,
is_inverse = FALSE,
confidence_level = NULL
)Arguments
- type
"linear"or"power", matched case-insensitively.- parameters
a numeric vector:
c(alpha, beta, sigma)for"linear";c(alpha, beta, xi, sigma)for"power".sigmais still required (e.g. 0) whenconfidence_levelisNULL– it only enters the calculation on the non-deterministic path.- x
a numeric vector: the values to evaluate the function at, or (when
inverse = TRUE) the values to evaluate the inverse function at.- inverse
if
TRUE, evaluates the inverse function (InverseFunction()) instead of the forward function (Function()).- is_inverse
"power"-only:PowerFunction's ownIsInverseproperty. An error fortype = "linear".- confidence_level
if given, evaluates the non-deterministic path at this quantile level; if
NULL(default), evaluates deterministically.