dlm-js
    Preparing search index...

    Interface DlmModelSpec

    Shared model specification fields used by DlmFitOptions, DlmMleOptions, and DlmOptions (dlmGenSys).

    These fields describe the structural components of the state-space model: polynomial trend, seasonal/harmonic, AR, and spline. A single DlmModelSpec object can be threaded through the full pipeline:

    const model: DlmModelSpec = { order: 1, harmonics: 2, seasonLength: 12 };
    const sys = dlmGenSys(model);
    const fit = await dlmFit(y, { ...model, obsStd: 120, processStd: [40, 10] });
    const mle = await dlmMLE(y, model);
    interface DlmModelSpec {
        arCoefficients?: number[];
        fullSeasonal?: boolean;
        harmonics?: number;
        order?: number;
        seasonLength?: number;
        spline?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    arCoefficients?: number[]

    AR coefficients (initial values). In MATLAB DLM, this is arphi.

    fullSeasonal?: boolean

    Full seasonal component (ns-1 dummy variables). In MATLAB DLM, this is fullseas.

    harmonics?: number

    Number of trigonometric harmonic pairs. In MATLAB DLM, this is trig.

    order?: number

    Polynomial trend order: 0 (level), 1 (level + slope), 2 (level + slope + acceleration). Default: 1.

    seasonLength?: number

    Seasons per cycle (period length). In MATLAB DLM, this is ns. Default: 12.

    spline?: boolean

    Spline mode for order=1: modifies W for integrated random walk.