STARResult._weight_at#

STARResult._weight_at(z)[source]#

The transition function at one value of the transition variable.

The scalar counterpart of regime_weight, used by the inherited simulate to read the regime weight off the simulated past; the clipping is the same.

Parameters:

z (float) – The transition variable.

Return type:

float

Returns:

The upper-regime weight in [0, 1].

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> res = LSTAR(rng.standard_normal(300), order=1).fit()
>>> round(res._weight_at(res.threshold), 6)
0.5
>>> res.simulate(50, seed=1).shape
(50,)