confirm_and_estimate
Confirm the model specification, generate the .inp, estimate parameters, and receive an immediate diagnosis including significance tests, residual plots, and histogram.
Instructions
Build the .inp for the confirmed spec, estimate and show diagnosis immediately.
Two modes:
Fresh model (base_pre_path=""): constructs from scratch using series in inp_path and the analyst-confirmed (lam, d, D, p, q, P, Q) spec.
Incremental (base_pre_path=<.pre>): loads all existing interventions and harmonics from the .pre, then replaces/adds only the ARMA part (p, q, P, Q) and mu. Use this to add ARMA to a model after the outlier cycle.
Always returns:
Parameter table with SE and t-stats
Diagnosis verdict (Q-test, JB, outliers)
Residual ACF/PACF + histogram
Parameters
inp_path : source .inp/.pre (series data and name; spec ignored unless base_pre_path is given) output_path : path to write the new .inp lam : Box-Cox lambda (0.0=log, 1.0=identity) d : regular differencing order D : seasonal differencing order (0=B1 harmonics, 1=B2 multiplicative) p : regular AR order q : regular MA order n_harmonics : harmonic pairs cos/sin (D=0 fresh only; ignored when base_pre_path is given — harmonics come from the .pre) seasonal : on/off switch for the whole deterministic seasonal package (cos/sin pairs + Nyquist alter). None (default) => derive from n_harmonics>0, correct for freq>=4. Pass False for a NON-seasonal series (no seasonal terms at all — avoids the spurious Nyquist of BUG-0005). Pass True for a SEMI-ANNUAL seasonal series (freq=2), whose only seasonal term is the Nyquist alter while n_harmonics (pairs) is 0. P : seasonal AR order (D=1 only) Q : seasonal MA order (D=1 only) base_pre_path : if given, load interventions+harmonics from this .pre and add only the ARMA spec. Typical use: final ARMA step after outlier cycle in B1 flow. estimate_mu : include mean parameter μ in estimation (default False). Set True when μ̄/SE > 2 in the residuals of the clean model. include_histogram : return histogram PNG as third item (default False). Keep False during the outlier cycle to save tokens; set True for the final model only. guion_path : (optional) path to guion.json — records this version guion_name : version name (e.g. "PC3"); auto-assigned if empty guion_decision : brief description of what this model tests or concludes guion_rationale : justification for the choices made guion_problems : problems found in the diagnosis of this model guion_next : description of the next version to try
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| D | No | ||
| P | No | ||
| Q | No | ||
| d | No | ||
| p | No | ||
| q | No | ||
| lam | No | ||
| inp_path | Yes | ||
| seasonal | No | ||
| guion_name | No | ||
| guion_next | No | ||
| guion_path | No | ||
| estimate_mu | No | ||
| n_harmonics | No | ||
| output_path | Yes | ||
| base_pre_path | No | ||
| guion_decision | No | ||
| guion_problems | No | ||
| guion_rationale | No | ||
| include_histogram | No |