Initial pass with diffuse prior to estimate starting values
Final pass with refined initial state from smoothed estimates
Model components are determined by the options parameter:
Polynomial trend (order 0/1/2)
Full or trigonometric seasonal
AR(p) components
When X is provided (n×q covariate matrix), the observation equation becomes:
y(t) = F_base·x(t) + X[t,:]·β + v
The β coefficients are appended to the state vector as static states
(identity evolution, zero process noise), matching the MATLAB DLM convention.
System matrices G and F are generated by dlmGenSys().
State noise covariance W = diag(w[0]², w[1]², ...) with zeros for
states beyond processStd.length.
Fit a Dynamic Linear Model (DLM).
Implements a two-pass estimation procedure:
Model components are determined by the options parameter:
When X is provided (n×q covariate matrix), the observation equation becomes: y(t) = F_base·x(t) + X[t,:]·β + v
The β coefficients are appended to the state vector as static states (identity evolution, zero process noise), matching the MATLAB DLM convention.
System matrices G and F are generated by dlmGenSys(). State noise covariance W = diag(w[0]², w[1]², ...) with zeros for states beyond processStd.length.