0
$\begingroup$

I'm confused on how to sample from the posterior predictive distribution of $\tilde{y}$. In class, we've seen that in Bayesian linear regression, the posterior predictive distribution of $\tilde{y}$ is a scaled t-distribution. However, when I look on the internet for some examples of code (R2Openbugs, JAGS...) on how to sample from the PDD of $\tilde{y}$ they hardly use the scaled t-distribution but they often use the normal distribution:

pred <- alpha + beta * new.x
Y.new ~ dnorm(pred, tau)

What is the correct way to get a sample from the PDD of $\tilde{y}$? I can't seem to find any code that shows how to use the scaled t-distribution.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.