I’m trying to incorporate coords on the likelihood, so I can plot groups of the posterior_predictive. The model seems to be built correctly, but when pm.Sample is about to finish I get the error of mismatching dims (5 != 3). My data consists of three levels: exercise (10), date (45) & obs_id (829). It works when I only have obs_id as the dims for the likelihood and I assume the 3 dims expected are Chains, Draws & obs_id. Any ideas?

```
prior_exercise_idx, prior_exercises = pd.factorize(data_model['Exercise'])
prior_date_idx, prior_dates = pd.factorize(data_model['Workout Start Time'])
prior_velocity_obs = data_model['Max Avg Velocity (m/s)']
prior_weight_obs = data_model['Weight']
prior_obs_id = data_model.index
prior_age_weights = scale_by_age(prior_dates)
prior_mvts = data_model['Exercise'].apply(find_mvt, args = [mvt_idata])
prior_velocity_weights = scale_by_velocity(prior_velocity_obs, prior_mvts)
prior_coords = {'exercise': prior_exercises,
'date': prior_dates,
'obs_id': prior_obs_id}
with pm.Model(coords = prior_coords) as prior_model:
# Inputs
exercise_idx = pm.Data('exercise_idx', prior_exercise_idx, dims = 'obs_id')
date_idx = pm.Data('date_idx', prior_date_idx, dims = 'obs_id')
velocity_obs = pm.Data('velocity_obs', prior_velocity_obs, dims = 'obs_id')
weight_obs = pm.Data('weight_obs', prior_weight_obs, dims = 'obs_id')
age_weights = pm.Data('age_weights', prior_age_weights, dims = 'date')
velocity_weights = pm.Data('velocity_weights', prior_velocity_weights, dims = 'obs_id')
# Global priors
global_alpha = pm.Gamma('global_alpha', mu = 120, sigma = 5)
global_alpha_sd = pm.HalfNormal('global_alpha_sd', sigma = 70)
global_beta_pos = pm.Gamma('global_beta_pos', mu = 80, sigma = 5)
global_beta = pm.Deterministic('global_beta', -global_beta_pos)
global_beta_sd = pm.HalfNormal('global_beta_sd', sigma = 60)
# Exercise priors
exercise_alpha_offset = pm.Normal('exercise_alpha_offset', mu = 0, sigma = 1, dims = 'exercise')
exercise_alpha = pm.Deterministic('exercise_alpha', global_alpha + global_alpha_sd*exercise_alpha_offset, dims = 'exercise')
exercise_alpha_sd = pm.HalfNormal('exercise_alpha_sd', sigma = 70, dims = 'exercise')
exercise_beta_offset = pm.Normal('exercise_beta_offset', mu = 0, sigma = 1, dims = 'exercise')
exercise_beta = pm.Deterministic('exercise_beta', global_beta + global_beta_sd*exercise_beta_offset, dims = 'exercise')
exercise_beta_sd = pm.HalfNormal('exercise_beta_sd', sigma = 60, dims = 'exercise')
# Date priors
date_alpha_offset = pm.Normal('date_alpha_offset', mu = 0, sigma = 1, dims = ['date', 'exercise'])
date_alpha = pm.Deterministic('date_alpha', exercise_alpha + exercise_alpha_sd*date_alpha_offset, dims = ['date', 'exercise'])
date_beta_offset = pm.Normal('date_beta_offset', mu = 0, sigma = 1, dims = ['date', 'exercise'])
date_beta = pm.Deterministic('date_beta', exercise_beta + exercise_beta_sd*date_beta_offset, dims = ['date', 'exercise'])
# Model error
sigma = pm.HalfNormal('sigma', sigma = 2)
sigma_age_weighted = pm.Deterministic('sigma_age_weighted', scale_sigma(sigma, age_weights), dims = 'date')
sigma_velocity_weighted = pm.Deterministic('sigma_velocity_weighted', scale_sigma(sigma_age_weighted[date_idx], velocity_weights), dims = 'obs_id')
# Expected value
mu = date_alpha[date_idx, exercise_idx] + date_beta[date_idx, exercise_idx]*velocity_obs
# Likelihood of the observations
likelihood = pm.Normal('likelihood',
mu = mu,
sigma = sigma_velocity_weighted,
observed = weight_obs,
dims = 'obs_id')
```