I am trying to implement a time varying state-space model in [R]. Model includes some exogenous variables that are part of the measurement and transition matrices.
I tried multiple packages and my final candidates are to FKF and DLM. However, I have a problem:
In DLM when I try to add seasonality to the model, the code becomes deadly slow. My dataset includes 10 years weekly observations and there is annual seasonality pattern in values. Therefore, I used
+ dlmModSeas(51)
to introduce it. However, I guess it adds 51 dummy variables to the model that makes it tremendously slow. Question: How to increase the speed of DLM? Do I make a mistake in using seasonality or it is inherently slow?
I highly appreciate your kind help in advance,
Yours, Hamid