1
$\begingroup$

I have a question regarding the use of the dlm CRAN package for forecasting values of a seasonal time series.

I've built a dlm model combining a stochastic local level model with a stochastic trigonometric (Fourier representation) seasonal component of period 96 (measurements every 15 mins with a daily cycle).

I used dlmMLE to estimate the parameters for my data and filtered and smoothed the series which all seems to be working fine.

However, when I try to use the dlmForecast function to predict out-of-sample observations, the predictions stay constant. The value of all "predictions" are equal to the sum of the filtered level and filtered seasonal components for the final observation in the series.

I have used dlmForecast with several other models including a model with a seasonal factor component but never before with a trigonometric seasonal component.

I notice in the documentation for dlmForecast it says "Currently, only constant models are allowed" so I wonder if this applies to trigonometric seasonal models.

$\endgroup$
1
$\begingroup$

I can give you two hints.

First, if you are using the standard recursive form (e.g. from Harvey) of the trigonometric seasonal components then your model is probably considered constant. Constant refers to the transition, observation matrices, not the state itself. In dlm terms, you have a constant model if you are not using the "J" components like JGG or JFF (if I remember correctly).

Second, when you say the filtering and smoothing are working out OK are you looking at the unobserved state and making sure that the periodic component (\psi) and trend (\mu) are independently sensible-looking?

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ I see what you mean about the J components. I'm not using them so yes it's a constant model. Thanks for clarifying. As for your second comment, I have plotted the smoothed and filtered level and seasonal components and they look as expected. It's just that when I use forecasting, the level component stays constant throughout the forecast (as expected) but the periodic component also stays constant. $\endgroup$ – doorleyr Jun 3 '14 at 8:36
  • $\begingroup$ Ok, one more shot in the dark ... are you using a dampening factor (often the notation is \rho)? What is it? $\endgroup$ – Eli S Jun 4 '14 at 3:13
  • $\begingroup$ No I'm not using any dampening factor. I don't think the dlm package actually provides for dampening factors in the dlmModTrig function and I haven't worked it in myself. Thanks anyway. $\endgroup$ – doorleyr Jun 9 '14 at 13:17

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.