Dynamic Linear Models package, dlmodeler

I’m checking out the dlmodeler package in R for a work project. It is accompanied by textbooks,
G. Petris, S. Petrone, P. Campagnoli, Dynamic Linear Models with R, Springer, 2009
and
J. Durbin, S. J. Koopman, Time Series Analysis by State Space Methods, 2nd edition, Oxford University Press, 2012.

I can also recommend
A. Pole, M. West, J. Harrison, Applied Bayesian Forecasting and Time Series Analysis, Chapman & Hall/CRC, 1994.

and the deeper, better
M. West, J. Harrison, Bayesian Forecasting and Dynamic Models, 2nd edition, Springer, 1997.

There is a related package, dlm by the author of one of the textbooks. The dlm package has a vignette. The “CRAN Task View” on time series analysis says “dlmodeler provides a unified interface to dlm“. Also, the code and the book make reference to the first edition of Durbin and Koopman.

I tested the smoothing functions of the package. I would like to use its prediction capabilities, especially dlmodeler.fit.MAD, but that in turn calls dlmodeler.forecast and that’s still in development, per

Note
Currently, the function only works for univariate time-series.
Currently the implementation is very slow, but its speed will be increased in future versions of this package.

from its documentation.

Anyway, I wrote some R code that exercises some of this. The second example in the script also needs this R image file for data. That data is available here, specifically at this link, and the accompanying paper is

J. A. Church, N. J. White, “A 20th century acceleration in global sea-level rise“, Geophysical Research Letters,
33(1), 16 January 2006.

On the subject, there is important discussion here, and in this recent paper, which models the matter using dynamical systems and invokes a transfer function interpretation. Being an engineer, I understand that and find that illuminating. (Accordingly, that paper by Orlić and Pasarić deserves its own response, something which I, at present, lack the time to do.) Note, however, that sea level rise is a non-linear process, and how quickly and how rapid depends upon ice sheet mechanisms we poorly understand, but are learning.

The second example produces this figure:
unit_test_DLM_smoother_2015-03-13_134009
(Click on image for a larger version. Use browser back button to return.)

And speaking of sea level rise …..

By the way, if you are into Python and especially Python 3, check out the pykalman module. Incidently — and gratuitously — Anaconda Python from Continuum.IO just rules.

About ecoquant

See https://wordpress.com/view/667-per-cm.net/ Retired data scientist and statistician. Now working projects in quantitative ecology and, specifically, phenology of Bryophyta and technical methods for their study.
This entry was posted in Bayesian, geophysics, mathematics, maths, oceanography, open source scientific software, Python 3, R, science, sea level rise, state-space models, statistics, stochastic algorithms, time series. Bookmark the permalink.

Leave a reply. Commenting standards are described in the About section linked from banner.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.