steve-the-bayesian / BOOM

A C++ library for Bayesian modeling, mainly through Markov chain Monte Carlo, but with a few other methods supported. BOOM = "Bayesian Object Oriented Modeling". It is also the sound your computer makes when it crashes.
GNU Lesser General Public License v2.1
35 stars 14 forks source link

Handle zero-variance state components in a better way. #54

Closed steve-the-bayesian closed 3 years ago

steve-the-bayesian commented 3 years ago

The current bsts model assumes that the state has variance R Q R', where R is rectangular block diagonal and Q is block diagonal. For state models (blocks) that have zero variance, we should skip a block in Q, and instead of having a separate block for R, the R for the previous model should have a row of 0's appended.

This will required reconfiguring the StateModelVector, but shouldn't be too hard.

The motivating model here is the Seasonal model with season.duration > 0.

steve-the-bayesian commented 3 years ago

Fixed in dev with the advent of NullMatrix and ErrorExpanderMatrix.