dlm-js
    Preparing search index...

    Interface DlmPriorSpec

    Prior specification for dlmPrior.

    Matches MATLAB/R DLM dlmGibbsDIG conventions: Inverse-Gamma priors on observation and system variance(s), with optional Normal priors on AR coefficients.

    import { dlmMLE, dlmPrior } from 'dlm-js';

    const prior = dlmPrior({
    obsVar: { shape: 2, rate: 1 },
    processVar: { shape: 2, rate: 1 },
    });
    const result = await dlmMLE(y, { order: 1, loss: prior });
    interface DlmPriorSpec {
        arCoef?: NormalPrior | NormalPrior[];
        obsVar?: InverseGammaPrior;
        processVar?: InverseGammaPrior | InverseGammaPrior[];
    }

    Properties

    Normal(mean, std) prior on AR coefficient(s) φⱼ. Single spec → recycled for all p coefficients. Array → per-coefficient. Only used when fitAr: true.

    IG(shape, rate) prior on observation variance s². Ignored when obsStdFixed is set in dlmMLE options.

    IG(shape, rate) prior on process variance(s) wᵢ². Single spec → recycled for all m components (MATLAB DLM convention). Array → per-component (length should equal state dimension m).