Why not use distributions derived from the MCMC to predict distributions yfrom anywhere x? In the example you are using, here are the relevant sections where eggmass = y and length = x
predict_eggmass<-function(pars,length)
{
a <- pars[, 1]
b <- pars[, 2]
sigma <- pars[, 3]
pred_mass <- a + b * length
pred_mass <- rnorm(length(a), pred_mass, sigma)
return(pred_mass)
}
pred_length <- 80
pred <- predict_eggmass(mcmc_salmon$trace, length=pred_length)
hist(pred, breaks=30, main='', probability=TRUE)
pred_BCI <- quantile(pred, p=c(0.025, 0.975))
2.5% 97.5%
33.61029 43.16795
I think that the distribution you refer to in your comment is available here as pred, and the confidence interval pred_BCI.