Thank you for your reply. The problem is we do not have a correct line of code for: ppcs_at_190. Osvaldo Martin solves the prediction y at a given x for linear regression at :
BookCode_Edition1/chp_03.ipynb at main · BayesianModelingandComputationInPython/BookCode_Edition1 · GitHub](BookCode_Edition1/chp_03.ipynb at main · BayesianModelingandComputationInPython/BookCode_Edition1 · GitHub) or in his excellent book page 82.but it is written in PYMC3. This is the exact same coding used in my code above:
with model_adelie_flipper_regression:
pm.set_data({"flipper_length": [190]})
ppcs_at_190 = pm.sample_posterior_predictive(idata_r.posterior, var_names=["y", "μ"])
fig, ax = plt.subplots()
az.plot_posterior(ppcs_at_190["y"], label="Posterior Predictive of Individual Penguin Mass given flipper length of 190mm", ax=ax)
But this code will not work in PYMC. v4.4.0. how do you port this into new PYMC and achieve (a) and (b) above.
Being able to predict y for a given x is a standard required requirement and very often the purpose of preceding with linear regression; I believe the extraction method from the idata object of the ppcs/given x for PYMC. v4.4.0 is all that is needed. Also the correct way to parameterise the az.plot_hdi() for the predicted y values/given x would allow the predicted hdi to be added to the graph. So if anyone has an easy way to port the pymc3 code for the predected y/given x values or script the code directly I would be grateful. Declan.