Could someone please explain what the difference is between the two, and perhaps avoid the worst statistical jargon?

I am currently using the dlm package to model dynamic regressions as can be seen on p.122-5 in Dynamic Linear Models with R, and I don't really grasp the theoretical difference between using dlmFilter and dlmSmooth.

More specifically, why is the dlmFilter example on p. 123 not considered dynamic, while the dlmSmooth example on p.124-5 is? And also, why are the two results fairly different?


The differences between those two functions is in what they're trying to achieve. dlmFilter is attempting to do filtering which is estimating the current state given the observations to that point. dlmSmooth is attempting to do smoothing which is attempting to estimate the state at any given time conditioned on ALL of the data.

The reason that the dlmFilter example on page 123 isn't considered dynamic is because the procedure used there is to just continually update a simple linear regression using the data. Essentially it is assumed that the regression coefficient is fixed the entire time and the only thing that function is doing is providing updates to the the estimate of those fixed coefficients.

A dynamic regression will allow the slope of the regression line to change over time. The results are fairly different for the reason that if you look at the data it seems like the slope does change over time so the dynamic regression will provide a nicer fit.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.