Regression predicted values in pymc

Hi Cluhmann,
Thank you for your reply. Unfortunately, the code when written in the newer pymc produces an error at the last 2 lines of code:az.plot_dist(ppcs_at_190[“y”], label=“Posterior Predictive of \nIndividual Penguin Mass”, ax=ax), irrespective of whether az.plot_dist() or az.plot_posterior() is used.

KeyError: ‘y’

This is not surprising as ‘y’ is not in the idata_r.posterior inference object… If I use idata_r.posterior_predictive[‘y’].values.flatten() this gives me all the predicted ‘y’ irrespective of the ‘x’ value(‘flipper length’). However the problem is to be able to make predictions at particular chosen 'x’s

What I am trying to get to work in the newer pymc using the inference idata_r object is:
From the idata_r object:
(a) to get the ppc[‘y’] distribution at a given ‘x’ = 190 flipper length ( conditional on ‘x’ ppc)

In other words how do you write the line of code?:
ppcs_at_190=

(b) to add the ppc[‘y’] hdi lines to the graph showing visually the variation in the predictive spread in the y values conditional on ‘x’.

In other words how do you write the line of code?:
az.plot_hdi('predicted hdi-values of y conditional on ‘x’)

Any help on this would be great:–my own attempts one of illustrated above fails.
Thanking you,Declan.