Icabalceta, Jorge L.
2004-Feb-16 15:44 UTC
[R] How do we obtain Posterior Predictive (Bayesian) P-values in R
Dear Friends, According to Gelman et al (2003), "...Bayesian P-values are defined as the probability that the replicated data could be more extreme than the observed data, as measured by the test quantity p=pr[T(y_rep,tetha) >T(y,tetha)|y]..." where p=Bayesian P-value, T=test statistics, y_rep=data from replicated experiment, y=data from original experiment, tetha=the function of interest. My question is, How do I calculate p (the bayesian P-value) in R from the chain I obtained from the Gibbs sampler? I have a matrix 'samp' [10,000x86] where I stored the result of each of the 10,000 iterations of the 86 variables of interest. Thanks for your help. Jorge [[alternative HTML version deleted]]