Solved – Estimating parameters of a dynamic linear model

dlmmarkov-chain-montecarloparticle filterr

I want to implement (in R) the following very simple Dynamic Linear Model for which I have 2 unknown time varying parameters (the variance of the observation error $\epsilon^1_t$ and the variance of the state error $\epsilon^2_t$).

$
\begin{matrix}
Y_t & = & \theta_t + \epsilon^1_t\\
\theta_{t+1} & = & \theta_{t}+\epsilon^2_t
\end{matrix} $

I want to estimate these parameters at each time point, without any look ahead bias.
From what I understand, I can use either a MCMC (on a rolling window to avoid the look ahead bias), or a particle filter (or Sequential Monte Carlo – SMC).

Which method would you use, and
What are the pros and cons of these two methods?

Bonus question: In these methods, how do you select the speed of change of the parameters? I guess we have to input an information here, because there is a bargain between using a lot of data to estimate the parameters and using less data to react more quickly to a change in the parameter?

Best Answer

If you have time varying parameters and want to do things sequentially (filtering), then SMC makes the most sense. MCMC is better when you want to condition on all of the data, or you have unknown static parameters that you want to estimate. Particle filters have issues with static parameters (degeneracy).

Related Question