smooth.OM.reapply
- OM.reapply(nsim=1000, type=None, bootstrap=False, heuristics=None, seed=None, **vcov_kwargs)
Re-run the model on the in-sample data for
nsimparameter draws.Python port of R’s
reapply.adam(R/reapply.R:87-778). Samplesnsimparameter vectors from a multivariate normal centred oncoefwith covariance fromvcov(), clips each draw to the admissible region, then re-runs the shared C++ ADAM kernel (adamCore::reapply) once per draw. The resulting per-draw fitted paths, states, transition / measurement matrices, persistence vectors, and final profiles are returned in aReapplyResultwith array shapes matching R exactly.- Parameters:
nsim (
int) – Number of parameter draws.bootstrap (
bool) – Forwarded tovcov().Trueuses the empirical covariance fromcoefbootstrap()instead of the analytical inverse-Fisher matrix.heuristics (
Optional[float]) – Forwarded tovcov()— heuristic diagonal proportion (vcov = diag(|coef| * heuristics)) when set.seed (
Optional[int]) – Seed for the MVN sampler. Makes the draw reproducible.**vcov_kwargs – Forwarded to
vcov()(step_size, bootstrap kwargs).
- Returns:
Container with
time_elapsed,y,states(c, n+L, nsim),refitted(n, nsim),fitted,model,transition(c, c, nsim),measurement(n, c, nsim),persistence(c, nsim),profile(c, L, nsim),random_parameters(nsim, k)andnsim.- Return type:
ReapplyResult
Notes
Covers ETS (with
bounds="usual","admissible"or"none") and pure / mixed ARIMA models. External regressors (X) are still rejected — that branch arrives in a follow-up.
Parent Class: OM