[R] concentrated likelihood in dlm
Ateljevich, Eli@DWR
Eli.Ateljevich at water.ca.gov
Thu Oct 2 17:40:47 CEST 2014
Hi,
I am trying to do maximum likelihood estimation on a univariate structural model with diffuse components in dlm.
The package already has an MLE function, but I would like to implement two enhancements, both of which are discussed in Harvey's Forecasting structural time series models and the Kalman Filter, section 3.4:
1. drop the d first components for diffusive terms to construct a proper prior
2. swap in the concentrated univariate likelihood for the standard multivariate (concentrated variance being the prediction error variance).
The first item is easy, so my question surrounds item (2). My hope is to re-use the MLE calculation apparatus in dlm, but swap out either one line in dlmLL that augments the likelihood.
The concentrated likelihood requires two ingredients that come from the filter: the one step ahead prediction error and its variance. I believe that the prediction errors are easy to find. There are functions that produce it outside dlmLL and also it is pretty easy to find in dlmLL itself. I am less clear how to obtain the variance, which is the univariate Var(y(t)|y(t-1)) and is denoted f_t in Harvey's book. Here y is the observation. My confidence is low because the function is written for a multivariate filter with SVD expression and my R skills are beginning-intermediate. At best I think f is here in SVD form and I'm concerned I might have to cast it or something if I want to work with it as a scalar.
Can anyone help me with an example of how to obtain f_t? Either within dlmLL or without? I appreciate any hints I can get.
[[alternative HTML version deleted]]
More information about the R-help
mailing list