smooth.OM.simulate

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

Re-simulate probabilities + 0/1 occurrence indicators.

Python port of R’s simulate.om (R/om.R:2272-2342). Calls ADAM.simulate() to obtain the latent ETS series via super().simulate(...), maps it to a probability via om_link_function(), and draws 0/1 occurrence indicators via rng.binomial(1, prob).

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

  • seed (Optional[int]) – RNG seed. Pins both the latent-error draw and the binomial occurrence draw.

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

  • randomizer (Optional[Any]) – Forwarded to ADAM.simulate(). When None (the default), substitute a Gaussian-noise sampler with the empirical residual std as the scale — needed because OM stores distribution="plogis" for which generate_errors() has no closed-form branch and self.scale is NaN.

  • **randomizer_kwargs – Forwarded to the randomizer.

Returns:

data and probability carry the probability series; occurrence carries the 0/1 indicators; latent carries the pre-link state-space output (used by OMG.simulate() to combine sub-models).

Return type:

SimulateResult


Parent Class: OM