Description
Currently, we can only do univariate timeseries analysis with the structural
framework. There's no reason for this -- the same framework can be extended to multiple time series. We would just need some extra API to support it. Basically:
- All components would need a
k_endog
andendog_names
arguments, which would determine how many variables we're modeling - When we call
build
, we need to gather up the set union of all endog_names. They don't have to all match, because we could have some components in one but not another - We need some new logic to build the
Z
matrix to map the right hidden states to the right observations.
The biggest challenge would be if we want to allow latent state sharing. For example, I could imagine a model where we want several time series to share the same LevelTrend
component. In this case, we might need an additional argument, like shared_endog_names
or something? Then instead of copying + block-concatenating the relevant matrices, we map all the different observed timeseries to the same hidden states via the Z matrix.
Obviously this is all just off the top of my head, suggestions/criticisms highly welcome.