Currently, sample_conditional_posterior and extract_components_from_idata return square brackets notations for the state coord, making it hard to select components when working with multivariate series, as showed in #544.
As discussed with @jessegrabowski and @OriolAbril, we should return an xarray.Dataset with one entry per observed state (e.g ['chirac2', 'sarkozy', 'hollande', 'macron', 'macron2']), thus enabling users to select the corresponding structural components with .sel. This also allows each observed state to have arbitrary model structure inside, which the current multivariate setup allows.
Currently,
sample_conditional_posteriorandextract_components_from_idatareturn square brackets notations for thestatecoord, making it hard to select components when working with multivariate series, as showed in #544.As discussed with @jessegrabowski and @OriolAbril, we should return an
xarray.Datasetwith one entry per observed state (e.g['chirac2', 'sarkozy', 'hollande', 'macron', 'macron2']), thus enabling users to select the corresponding structural components with.sel. This also allows each observed state to have arbitrary model structure inside, which the current multivariate setup allows.