Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Time varying regression TVRegression #282

Open
guilhermebodin opened this issue Jun 11, 2021 · 1 comment
Open

Add Time varying regression TVRegression #282

guilhermebodin opened this issue Jun 11, 2021 · 1 comment

Comments

@guilhermebodin
Copy link
Member

No description provided.

@PaulMainwood
Copy link

PaulMainwood commented Jun 25, 2021

A big upvote for addition of this model.

Ideally, it would be based on the LocalLevelExplanatory model.

Quoting the doc string from LocalLevelExplanatory:

LocalLevelExplanatory(y::Vector{Fl}, X::Matrix{Fl}) where Fl
```math
A local level model with explanatory variables is defined by:
\begin{aligned}
        y_{t} &=  \mu_{t} + X_{1,t} \cdot \beta_{1,t} + \dots + X_{n,t} \cdot \beta_{n,t} + \varepsilon_{t} \quad &\varepsilon_{t} \sim \mathcal{N}(0, \sigma^2_{\varepsilon})\\
        \mu_{t+1} &= \mu_{t} + \xi_{t} &\xi_{t} \sim \mathcal{N}(0, \sigma^2_{\xi})\\
        \beta_{1,t+1} &= \beta_{1,t} &\tau_{1, t} \sim \mathcal{N}(0, \sigma^2_{\tau_{1}})\\
        \dots &= \dots\\
        \beta_{n,t+1} &= \beta_{n,t} &\tau_{n, t} \sim \mathcal{N}(0, \sigma^2_{\tau_{n}})\\\\
\end{aligned}
\end{gather*}

So the model could be made by making use of these \tau_{1} to \tau_{n}, and having the beta equations become:

\beta_{1, t+1} = \beta_{1, t} + tau_{1, t}
\dots &= \dots\\
\beta_{n, t+1} = \beta_{n, t} + tau_{n, t}

This would give a local level model with explanatory variables that allows time-varying regression values.

At the moment, I am still unable to get this working in versions 0.5.x (I think due to muddling myself setting the hyperparameters) so a worked out model would be hugely helpful.

Thank you for any attention you can give this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants