The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [kalman-filter]

The Kalman filter is an algorithm for estimating the mean vector and variance-covariance matrix of the unknown state in a state space model.

Filter by
Sorted by
Tagged with
52
votes
5answers
23k views

What are disadvantages of state-space models and Kalman Filter for time-series modelling?

Given all good properties of state-space models and KF, I wonder - what are disadvantages of state-space modelling and using Kalman Filter (or EKF, UKF or particle filter) for estimation? Over let's ...
51
votes
2answers
28k views

What is the difference between a particle filter (sequential Monte Carlo) and a Kalman filter?

A particle filter and Kalman filter are both recursive Bayesian estimators. I often encounter Kalman filters in my field, but very rarely see the usage of a particle filter. When would one be used ...
25
votes
2answers
9k views

What is the difference between Kalman filter and moving average?

I am computing a very simple Kalman filter (random walk + noise model). I find that the output of the filter is very similar to a moving average. Is there an equivalence between the two? If not, ...
24
votes
2answers
1k views

Switch from Modelling a Process using a Poisson Distribution to use a Negative Binomial Distribution?

$\newcommand{\P}{\mathbb{P}}$We have a random process that may-or-may-not occur multiple times in a set period of time $T$. We have a data feed from a pre-existing model of this process, that provides ...
23
votes
4answers
29k views

R code for time series forecasting using Kalman filter

Does anybody have a good example for Time Series Forecasting/smoothing using Kalman Filter in R?
19
votes
1answer
13k views

Difference between Hidden Markov models and Particle Filter (and Kalman Filter)

Here is my old question I would like to ask if someone knows the difference (if there is any difference) between Hidden Markov models (HMM) and Particle Filter (PF), and as a consequence Kalman ...
14
votes
2answers
5k views

When will a Kalman filter give better results than a simple moving average?

I recently implemented a Kalman filter on the simple example of measuring a particles position with a random velocity and acceleration. I found that Kalman filter worked well, but I then asked myself ...
13
votes
1answer
7k views

LogLikelihood Parameter Estimation for Linear Gaussian Kalman Filter

I have written some code that can do Kalman filtering (using a number of different Kalman-type filters [Information Filter et al.]) for Linear Gaussian State Space Analysis for an n-dimensional state ...
12
votes
2answers
17k views

How to use a Kalman filter?

I have a trajectory of an object in a 2D space (a surface). The trajectory is given as a sequence of (x,y) coordinates. I know that my measurements are noisy and ...
11
votes
2answers
3k views

State space representation of ARMA(p,q) from Hamilton

I have been reading Hamilton Chapter 13 and he has the following state space representation for an ARMA(p,q). Let $r = \max(p,q+1)$.Then the ARMA (p,q) process is as follows: $$ \begin{aligned} y_t -\...
11
votes
3answers
2k views

Why is the likelihood in Kalman filter computed using filter results instead of smoother results?

I am using the Kalman filter in a very standard way. The system is represented by the state equation $x_{t+1}=Fx_{t}+v_{t+1}$ and the observation equation $y_{t}=Hx_{t}+Az_{t}+w_{t}$. Textbooks teach ...
11
votes
2answers
8k views

Using Kalman filters to impute Missing Values in Time Series

I am interested in how Kalman Filters can be used to impute missing values in Time Series Data. Is it also applicable if some consecutive time points are missing? I cannot find much on this topic. Any ...
11
votes
2answers
228 views

Can we use bootstrap samples that are smaller than original sample?

I want to use bootstrapping to estimate confidence intervals for estimated parameters from a panel dataset with N=250 firms and T=50 month. The estimation of parameters is computationally expensive (...
10
votes
1answer
3k views

Kalman filter vs. smoothing splines

Q: For which data is it appropriate to use state-space modeling and Kalman filtering instead of smoothing splines and vice versa? Is there some equivalence relationship between the two? I'm trying ...
10
votes
1answer
1k views

Why is forecasting of ARMA models performed by Kalman filter

What are the advantages of expressing an ARMA model as a state-space-model and do forecasting using a Kalman filter? This methodology is for example used in the SARIMAX implementation of python-...
10
votes
2answers
6k views

How to estimate parameters for a Kalman filter

In a previous question, I inquired about fitting distributions to some non-Gaussian empirical data. It was suggested to me offline, that I might try the assumption that the data is Gaussian and fit a ...
10
votes
1answer
632 views

Explaining Kalman filters in state space models

What are the steps involved in the use of Kalman filters in state space models? I have seen a couple of different formulations, but I'm not sure about the details. For example, Cowpertwait starts ...
10
votes
3answers
1k views

How to model a biased coin with time varying bias?

Models of biased coins typically have one parameter $\theta = P(\text{Head} | \theta)$. One way to estimate $\theta$ from a series of draws is to use a beta prior and compute posterior distribution ...
9
votes
1answer
3k views

ARIMA vs Kalman filter - how are they related

When I started reading about Kalman filter it thought that it is a special case of ARIMA model (namely ARIMA(0,1,1)). But actually it seems that situation is more complicated. First of all, ARIMA can ...
9
votes
1answer
760 views

Confusion related to linear dynamic systems

I was reading this book Pattern Recognition and Machine Learning by Bishop. I had a confusion related to a derivation of the linear dynamical system. In LDS we assume the latent variables to be ...
9
votes
0answers
595 views

Estimation of ARMA: state space vs. alternatives

I am interested in estimation of ARMA models. I understand that a popular approach is to write the model down in the state space form and then maximize the likelihood of the model using some ...
8
votes
5answers
2k views

Introduction to Kalman filters

What are good introductory books on Kalman filters? I like lots of examples and practical techniques, and less theory.
8
votes
2answers
3k views

How to handle incomplete data in Kalman Filter?

What are some typical approaches to handling incomplete data in the Kalman Filter? I'm talking about the situation where some elements of the observed vector $y_t$ are missing, distinct from the case ...
8
votes
1answer
1k views

Where to start: Unevenly spaced time series, with lots of outliers or randomness

I don't really know what's possible, and would like a pointer in the right direction. I have measurements of time and position which could be anything from a person walking, a vehicle on a road, or ...
7
votes
2answers
834 views

What's the model representation for the first difference of a local level model?

This is my first exercise for space state models and I've a few questions I'd need to resolve before I actually start doing the exercise. Unfortunately, I'm self teaching (I have no professor to ask) ...
7
votes
2answers
1k views

Identifiability of a state space model (Dynamic Linear Model)

Take a general linear Gaussian state space model (SSM)(aka Dynamic Linear Model DLM): \begin{align} X_{t+1} &= FX_t + V_t \\ Y &= HX_t+W_t \\[10pt] V_t &\sim N(0,Q) \\ W_t &...
7
votes
1answer
1k views

“Monte Carlo Kalman Filter” vs Unscented Kalman Filter

Recently, I have come across references to the Monte Carlo Kalman Filter (MCKF), which is a variant of the Sigma-Point Kalman Filter (SPKF). The key difference between the MCKF and the remainder of ...
7
votes
1answer
3k views

How does one apply Kalman smoothing with irregular time steps?

I would like to apply Kalman smoothing to a series of data sampled at irregular time points. There is a claim on Stack Exchange that "For irregular spaced time series it's easy to construct a Kalman ...
7
votes
1answer
4k views

Unscented Kalman filter-negative covariance matrix

I have recently started working on the unscented Kalman filter. I coded the numerically stable version (i.e., square root Kalman filter) and used MATLAB for implementing. In the final update step, ...
6
votes
4answers
709 views

For regression with time varying parameters, SGD or Kalman filter?

What is the advantage of kalman filters as an online update mechanism instead of the stochastic gradient descent?
6
votes
1answer
3k views

Why is the Kalman Filter a specific case of a (dynamic) Bayesian network?

Question: How can this be the case? Why are Kalman filters so much more complicated than any other Bayesian network? Are there any Bayesian networks which are intermediate in complexity? Perhaps one ...
6
votes
2answers
2k views

Estimating State Space Model in R with MARSS package and shared parameters between Q and R [closed]

I am trying to estimate the following unobserved components model using the MARSS package $y_t = \mu_t + \varepsilon_t $ $\mu_t = \mu_{t-1} + \beta_{t-1}$ $\beta_t = \beta_{t-1} + \zeta_{t}$ with ...
6
votes
1answer
2k views

Maximum likelihood estimation procedures for state-space linear models

State-space models are represented by a state equation and an observation equation (or system of equations to be more precise). These equations are parametarized by components including a transition ...
6
votes
1answer
500 views

State space model with regression effects

I'm trying to show the following (exercise 3.11.4 from Durbin and Koopman (2012)): Show that the state space model defined by $$ y_t=X_t\beta+Z_t\alpha_t+\epsilon_t\\ \alpha_{t+1}=W_t\beta+T_t\...
6
votes
2answers
1k views

Time Varying System Matrices in Kalman Filter

Kalman filter can accommodate time varying system matrices. Equations to run the filter are the same and it preserves its optimality under linear gaussian model. My question is the following: Can ...
6
votes
1answer
217 views

Can Kalman Filtering be done hierarchically - estimated from multiple time series with the same parameters?

I have a large number of of noisy time series recordings (trials), for which I wish to estimate the state transition model underlying them using the Kalman filter. The process generating the time ...
6
votes
1answer
988 views

Methods of fitting a dynamic linear model

I'm taking a time series course and am learning about exchangeable time series form of dynamic linear models (DLMs). This is given by: \begin{align*} \mathbf{y}_t' &= \mathbf{F}_t'\boldsymbol{\...
6
votes
1answer
746 views

Statistical methods to validate the performance of a linear Kalman filter algorithm

I have a problem with a linear Kalman filter algorithm that gets as input some sensor measurements $z_i$ with known measurement error with standard deviation $\sigma_{i,{measured}}$ (assumed normally ...
5
votes
4answers
8k views

Kalman filter equation derivation

I'm studying the Kalman Filter for tracking and smoothing. Even if I have understood the Bayesian filter concept, and I can efficiently use some of Kalman Filter implementation I'm stucked on ...
5
votes
1answer
3k views

Why is the Confidence Interval Changing for this Time-Series

I have some R code (which I did not write) and which performs some state space analysis on some time-series. The data itself is shown as dots (scatter plot) and the Kalman filtered and smoothed state ...
5
votes
1answer
5k views

Beginner level: Help in learning Kalman Smoother (Part 1) [closed]

Parameter estimation of Linear Dynamical system is a tutorial which explains Kalman Filter, Smoothing, and Expectation Maximization. I have followed the derivation for Kalman Filter. But cannot ...
5
votes
1answer
1k views

Tracking and data association with Kalman filters

I am trying to solve tracking problem. At certain points in time I receive object location and I should make decision whether received object location belongs to existing track or not. If not, I ...
5
votes
1answer
163 views

Are matrix decomposition based Kalman filter algorithms faster or more robust?

I have been using linear Kalman Filters for several different applications. I wrote the implementation from scratch and it follows Welch & Bishop verbatim in the simplest way. I have also heard ...
5
votes
1answer
613 views

How to apply a Kalman filter to use both previous and future measurements of a random variable?

I'm trying to estimate the state of a Gaussian random walk with central tendency based on time series measurements with varying uncertainties. My random variable has the following form: $ \frac{d x}{...
5
votes
1answer
431 views

Efficient forecasting of daily and weekly seasonality in minute data

If I naively apply STL, Holt-Winters or Kalman-Filter approaches to the problem of extracting the seasonality and trend components of a one-minute data stream, I will end up with about 10K cyclic sub-...
5
votes
1answer
2k views

Maximum Likelihood estimation and the Kalman filter

I know the Kalman filter recursions and can derive these but what I don't really get is how to estimate the hyper parameters using maximum likelihood. I understand that when running the Kalman filter ...
5
votes
0answers
587 views

Predict next set of coordinates in 3D space [closed]

Please forgive me if my question does not make sense - I am pretty new to stats and could use some guidance. I would like to predict the next position of an object in 3D space. I have a list for each ...
5
votes
2answers
89 views

Is there something analogous to a Kalman filter for estimating continuous variables that are supported over bounded intervals?

Suppose that I have a robot which is somewhere in a $100 \times 100$ arena. A Kalman filter could be used to estimate its position from noisy measurements. The estimate produced from the Kalman ...
5
votes
0answers
264 views

Kalman filtering confusion [closed]

Say I have a very simple model \begin{align} &C_t = C_{t-1} + z_t\\ &X_t = C_t + v_t \end{align} everything is 1-dimensional, $z_t$ and $v_t$ are are uncorrelated and white noises, and $X_t$ ...
5
votes
0answers
3k views

Possible causes for the state noise variance to become negative in a Kalman Filter?

I am having some trouble debugging an application of a linear discreet Kalman Filter. From time to time, I find that there are diagonal elements of the covariance matrix that become negative. This is ...