NonlinearSSM._lag_stack_state_space#

classmethod NonlinearSSM._lag_stack_state_space(mean_map, *, order, sigma2, measurement_variance, center, spread)[source]#

Wrap a nonlinear autoregressive mean as a noisily observed state space.

The shared emitter behind the observation-driven nonlinear models (threshold, smooth-transition, neural): the latent state is the order-deep lag stack of the true series, the transition applies the fitted conditional mean to the stack and shifts it, and the observation reads the stack’s first component through Gaussian measurement error. With zero measurement error the model is observation-driven and filtering is vacuous, which is why the variance is required and must be strictly positive – the emitted object is the errors-in-variables reading of the fit, not a restatement of it.

State noise enters only the first stack component, so the state covariance is singular whenever order > 1; the three filters and both Rauch smoothers accept that, and the particle smoother’s nondegenerate-transition refusal fires honestly.

Parameters:
  • mean_map (Callable[[NDArray[double]], NDArray[double]]) – Batched conditional mean: an (n, order) block of lag rows [y_{t-1}, ..., y_{t-order}] to (n,) means.

  • order (int) – Depth of the lag stack, at least 1.

  • sigma2 (float) – Fitted innovation variance, strictly positive.

  • measurement_variance (float) – Observation noise variance, strictly positive.

  • center (float) – Initial state mean, applied to every stack component (typically the sample mean).

  • spread (float) – Initial per-component state variance (typically the sample variance).

Return type:

_NonlinearStateSpace

Returns:

The _NonlinearStateSpace.

Raises:

SpecificationError – If the variances are not strictly positive or the order is not at least 1.