TVARResult._weight_at#

TVARResult._weight_at(values)[source]#

The upper-regime indicator at arbitrary transition values.

Parameters:

values (NDArray[double]) – Transition-variable values, in the original units.

Return type:

NDArray[double]

Returns:

1.0 where a value exceeds the threshold, 0.0 otherwise.

Example

>>> import numpy as np
>>> y = np.random.default_rng(0).standard_normal((200, 2))
>>> res = TVAR(y, order=1, transition_variable="y1", delay=1).fit()
>>> r = res.threshold
>>> res._weight_at(np.array([r - 1.0, r, r + 1e-9]))
array([0., 0., 1.])