Understanding the dlm package in r

I am trying to forecast a monthly time series using the R package dlm. I am reading through the vignette and have a few questions. Regarding the forecasting of the UKgas data I see

dlmGas <- dlmModPoly() + dlmModSeas(4)

the 4 is the quaterly format of the series, so for a monthly series, should I use dlmModSeas(12) instead?

Also for the functions

diag(W(dlmGas))[2:3] <- exp(x[1:2])
V(dlmGas) <- exp(x[3])

what are these numbers and how are they chose? also how would this look different for a monthly series?


To the first question: I think dlmModSeas(12) is correct for monthly data. And if you execute in R the command:

dlmModPoly() + dlmModSeas(12) 

and look at the matrix W you see, that still only the second and the third diagonal elements are different from zero.

I suppose the diag(W(dlmGas))[2] refers to the system noise variance of the trend component (dlmModPoly()) and diag(W(dlmGas))[3] to the system noise variance of the seasonal component (dlmModSeas(12))

So, as I understand it, increasing the number of seasons does not increase the diagonal elements of W to be estimated.

Need Your Help

Pass ID of radio-input to the attached label


I'm using the following view to create an input of radio type:

Oracle Data Type for text file?

sql database oracle database-design types

I need to create a table in Oracle that will store a series of large text files. After looking at the Oracle datatype's it is unclear what type I should use to store the files.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.