Bayesian model checking