Bounded transformation functions

Bounded transformation functions

Note

Version 1.0.3

Public fields

epsilon

Numeric, \(\epsilon\) transformation parameter.

Active bindings

alpha

Numeric, \(\alpha\) transformation parameter.

beta

Numeric, \(\beta\) transformation parameter.

link

Character, name of the link function \(g\).

monotonicity

Character, type of monotonicity of \(g\).

Methods


Method new()

Initialize a boundTransform object.

Usage

boundTransform$new(alpha = 0, beta = 1, link = "invgumbel")

Arguments

alpha

Numeric, \(\alpha\) transformation parameter.

beta

Numeric, \(\beta\) transformation parameter.

link

Character, link function.


Method set_transform()

Set the transform function \(g\), \(g^{-1}\), \(g^{\prime}\).

Usage

boundTransform$set_transform(link)

Arguments

link

Character, link function. Valid links are "invgumbel", "gumbel", "logis", "norm".


Method X_prime()

Map the risk-driver \(X_t\) into the normalized risk-driver \(X_t^{\prime}\).

Usage

boundTransform$X_prime(Xt)

Arguments

Xt

Numeric, risk driver in \( X_t \in (\alpha, \alpha+\beta)\).

Details

The function computes: $$\text{X}^{\prime}(X_t) = \frac{X_t - \alpha}{\beta}$$

Returns

Numeric, normalized risk driver \(X_t^{\prime} \in (0, 1)\).


Method iX_prime()

Map the normalized variable \(X_t^{\prime}\) to the risk driver \(X_t\).

Usage

boundTransform$iX_prime(Xt_prime)

Arguments

Xt_prime

Numeric, normalized risk driver \(X_t^{\prime} \in (0, 1)\).

Details

The function computes: $$\text{iX}^{\prime}(X_t^{\prime}) = \alpha + \beta \cdot X_t^{\prime}$$

Returns

Numeric, risk driver in \( X_t \in (\alpha, \alpha+\beta)\).


Method Y()

Map the normalized risk driver \(X_t^{\prime}\) in the transformed variable \(Y_t\)

Usage

boundTransform$Y(Xt_prime)

Arguments

Xt_prime

Numeric, normalized risk driver \(X_t^{\prime} \in (0, 1)\).

Details

The function computes: $$\text{Y}(X_t^{\prime}) = g(X_t^{\prime})$$

Returns

Numeric, transformed variable \(Y_t \in (-\infty, \infty)\).


Method iY()

Map the transformed variable \(Y_t\) into the normalized risk driver \(X_t^{\prime}\)

Usage

boundTransform$iY(Yt)

Arguments

Yt

Numeric, transformed variable \(Y_t \in (-\infty, \infty)\).

Details

The function computes: $$\text{iY}(Y_t) = g^{-1}(Y_t)$$

Returns

Numeric, normalized risk driver \(X_t^{\prime} \in (0, 1)\).


Method g()

Link function to map \(X_t^{\prime}\) to \(Y_t\).

Usage

boundTransform$g(X_prime)

Arguments

X_prime

Numeric, normalized risk driver \(X_t^{\prime} \in (0, 1)\).

Returns

Numeric, transformed variable \(Y_t \in (-\infty, \infty)\).


Method ig()

Inverse of the function to map \(Y_t\) to \(X^{\prime}\).

Usage

boundTransform$ig(Yt)

Arguments

Yt

Numeric, transformed variable \(Y_t \in (-\infty, \infty)\).

Returns

Numeric, normalized risk driver \(X_t^{\prime} \in (0, 1)\).


Method g_prime()

First derivative of the function \(g\).

Usage

boundTransform$g_prime(X_prime)

Arguments

X_prime

Numeric, normalized risk driver \(X_t^{\prime} \in (0, 1)\).


Method fit()

Fit the best parameters \(\alpha\) and \(\beta\) from a given time series

Usage

boundTransform$fit(x, epsilon = 0.01, min_pos = 1, max_pos = 1)

Arguments

x

time series of solar risk drivers in \((0, 1)\).

epsilon

Numeric

min_pos

Integer, position of the minimum. For example when 2 the minimum is the second lowest value.

max_pos

Integer, position of the maximum. For example when 3 the maximum is the third greatest value.

Details

Return a list that contains:

alpha

Numeric, \(\alpha\) transformation parameter.

beta

Numeric, \(\beta\) transformation parameter.

epsilon

Numeric, threshold used for fitting.

Xt_min

Numeric, minimum value of the time series.

Xt_min

Numeric, maximum value of the time series.

Returns

A named list.


Method bounds()

Compute the bounds for the transformed variables.

Usage

boundTransform$bounds(target = "Xt")

Arguments

target

target variable. Available choices are:

"Xt"

Solar risk driver, the bounds returned are \([\alpha, \alpha + \beta]\).

"Kt"

Clearness index, the bounds returned are \([1-\alpha-\beta, 1-\alpha]\).

"Yt"

Solar transform, the bounds returned are \([-\infty, \infty]\).

Returns

A numeric vector where the first element is the lower bound and the second the upper bound.


Method update()

Update the transformation parameters \(\alpha\) and \(\beta\).

Usage

boundTransform$update(alpha, beta)

Arguments

alpha

Numeric, transformation parameter.

beta

Numeric, transformation parameter.

Returns

Update the slots $alpha and $beta.


Method print()

Print method for the class boundTransform

Usage

boundTransform$print()


Method clone()

The objects of this class are cloneable with this method.

Usage

boundTransform$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

st <- boundTransform$new()