LSTAR.fit#

LSTAR.fit()[source]#

Estimate the transition by concentrated least squares.

Return type:

STARResult

Returns:

The fitted STARResult.

Raises:

NumericalError – If the transition variable has zero variance.

Example

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> res = LSTAR(rng.standard_normal(300), order=1).fit()
>>> res.transition, res.nobs, res.n_params
('logistic', 299, 6)
>>> LSTAR(np.ones(100), order=1).fit()
Traceback (most recent call last):
    ...
cultivars.exceptions.NumericalError: transition variable has zero variance.