Hi Sigrid,
You can get out the means and covariances over the model's latent state using the `posterior_marginals` method of a LinearGaussianStateSpaceModel instance:
```
ssm = model.make_state_space_model(num_timesteps, param_vals=q_samples_)
latent_means, latent_covs = ssm.posterior_marginals(observed_time_series)
```
where
`model = tfp.sts.Sum([..., tfp.sts.DynamicLinearRegression(...), ...], ...)`
is an STS model instance, and
`q_samples_ = {k: q.sample(50) for k, q in variational_distributions.items()}`
are posterior model params sampled from a fitted variational distribution (as in the example notebook
If your model is a `tfp.sts.Sum` of multiple components, then `np.cumsum([c.latent_size for c in model.components])` will give you the start and end indices of all the model components in the latent state, which might be useful if you want to slice out just the dynamic regression part.
Dave