smooth.ADAM.simulate

ADAM.simulate(nsim=1, seed=None, obs=None, randomizer=None, **randomizer_kwargs)

Re-simulate obs observations from the fitted model.

Python port of R’s simulate.adam (R/adam.R:7365-7611). Pulls the fitted state matrices off self and feeds them through the shared C++ adamCore::simulate kernel. The default error distribution / scale match what the model was fitted under, so the simulated series statistically resembles the in-sample fit.

Parameters:
  • nsim (int) – Number of simulated series.

  • seed (Optional[int]) – Seed for the RNG used by the error sampler. Set this to make the result deterministic across runs.

  • obs (Optional[int]) – Number of observations per simulated series. Defaults to the in-sample length.

  • randomizer (Optional[Any]) – Override the model’s fitted distribution. Accepts the same R-style names / callables as sim_es(). When None (the default), R’s simulate.adam distribution dispatch is used: self.distribution selects the per-distribution sampler from sample_reforecast_errors (same dispatch as reforecast), scaled by self.scale.

  • **randomizer_kwargs – Forwarded to the randomizer when overridden.

Returns:

Container with data, states, residuals, persistence, measurement, transition, initial, probability, occurrence — matches R’s "adam.sim" S3 list field-for-field. The model string is suffixed with " estimated via adam()" so print() reproduces R’s print.adam.sim output.

Return type:

SimulateResult


Parent Class: ADAM