DylanB95 / statespacer

statespacer: State Space Modelling in R
https://dylanb95.github.io/statespacer/
Other
15 stars 7 forks source link

Forward Looking Bias #7

Closed npschweizer closed 1 month ago

npschweizer commented 1 month ago

Hi!

More a question than an issue. I want to train a regression state space model, but I want to do so such that forward-looking bias isn't an issue. I saw on the homepage for this package that dynamic regression coefficients were an option, but I don't remember seeing any instructions for implementing them and it's my understanding that the standard configuration calculates coefficients across the entire timeseries. Is that correct? How would I make my coefficients dynamic?

Thanks for the great package!

DylanB95 commented 1 month ago

Hi, you can use the arguments addvar_list in combination with format_addvar. format_advar is a k x k matrix specifying the structure of the covariance matrix of the k coefficients. For example, using diag(1, k, k) would make the k coefficients independent from each other.