n error.</p>
<p>For further details see any textbook on time series such as Shumway &amp; Stoffer (2017), which provide an analogous R implementation in <code><a href="https://rdrr.io/pkg/astsa/man/Kfilter0.html" class="external-link">astsa::Kfilter0</a></code>.
For another fast (C-based) implementation that also allows time-varying system matrices and non-stationary data see <code><a href="https://waternumbers.github.io/FKF/reference/fkf.html" class="external-link">FKF::fkf</a></code>.</p>
    </div>
    <