Bayesian p-value in WinBUGS

#1
Hi everybody. Nice to greet you.
I have a question about Bayesian p-value in WinBUGS.
I'm trying to fit a Bayesian Beta Regression according to Branscum et al. (2007). But I don't know what I must to do to obtain the bayesian p-value to validate the model. Suppose that y is the response variable (with 0 < y < 1) and x is the independent variable. Then my code in WinBUGS is the following:

model{
for(i in 1:N){
y ~ dbeta(a, b)
a <- mu * phi
b <- (1 - mu) * phi
logit(mu) <- Beta1 + Beta2 * x
}
phi ~ dgamma(1, 1)
Beta1 ~ dnorm(0, 1)
Beta2 ~ dnorm(0, 1)
}

In advance, thanks a lot for your help!

Kind regards,
Rodrigo.
 
#2
Generally speaking, the p-value is a frequentist approach to model validation. Therefore, for the whole model, I am not sure if you need to (or even, if you should) calculate a p-value. Perhaps it might be more safe to use DIC (which can automatically be generated from WinBUGS) to compare the model to other candidate ones.

For the parameters Beta1 and Beta2, what you could do is make a caterpillar plot (provided you have been sampling them during model iterations) and see if their 95% C.I. include the value 0. If they do, it would be the Bayesian version of a p-value higher than 0.05.

You will note that in the paper you refer (if i found the correct one!), the authors also do not use p-values as a validation method, but rather use the Bayesian Factor for model selection.

I hope this helps! :)