wwrechard / pydlm

A python library for Bayesian time series modeling
BSD 3-Clause "New" or "Revised" License
475 stars 98 forks source link

How do I create a Time Varying Model using pydlm? #52

Closed Samya98 closed 3 years ago

Samya98 commented 3 years ago

I want to create a Time Varying Linear model like this: image How should I proceed with the same? You documentations lacks some notations, adding which would be really beneficial. But nice work. Its really useful in my research

phaabe commented 3 years ago

@Samya98 did you find documentation or a solution? Would you share it please?

Samya98 commented 3 years ago

@Samya98 did you find documentation or a solution? Would you share it please?

Hey. I read the document carefully and focused on the Dynamic Component. It turns out that all i needed was to use the code dlm(y) + trend(discount=1) + dynamic(X, discount=1) to get the above model. I hope this helps. By default, dynamic takes one regressor, in my case X. If you want more, just add the same to the argument and supply the data.