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). CallsADAM.simulate()to obtain the latent ETS series viasuper().simulate(...), maps it to a probability viaom_link_function(), and draws 0/1 occurrence indicators viarng.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 toADAM.simulate(). WhenNone(the default), substitute a Gaussian-noise sampler with the empirical residual std as the scale — needed because OM storesdistribution="plogis"for whichgenerate_errors()has no closed-form branch andself.scaleisNaN.**randomizer_kwargs – Forwarded to the randomizer.
- Returns:
dataandprobabilitycarry the probability series;occurrencecarries the 0/1 indicators;latentcarries the pre-link state-space output (used byOMG.simulate()to combine sub-models).- Return type:
SimulateResult
Parent Class: OM