Let’s say I have a dataset of X and Y with 100 observations from each. I developed a Bayesian simple linear regression model from X to Y, using PyMC, like this:
Y = Alpha + Beta * X + Epsilon
As you appreciate, there will be some stochastic prior distributions for the model parameters and a deterministic variable like mu=Deterministic(‘mu’, alpha + beta*X) to be used as the mean value of the likelihood normal distribution.
After running the model, when I use the ‘summary’ function of ArviZ, it will return the posterior statistics of alpha, beta, epsilon, and from mu[0] to mu[100]. My question is how I can return the result of a deterministic variable (mu) for only a single observation (i.e., for mu[75])? Specifying the variable name using the var_names method of the summary function does not limit the outputs of mu, but still expresses mu for every single observation. Is there any other method for the summary function of ArviZ to pick the result of a deterministic variable for a single observation?
Besides that, the same question applies to the visual outputs. When I use the plot_posterior function of ArviZ, it returns HDI graphs for every single observation (like from m[0] to mu[100]). How can I set a limit for the number of those outputs or pick only a single one?