This function conducts Bayesian model checking by comparing observed and reference data sets and reveals the result via "p-value" and "RPS" (as well as the plot).
Usage
BMCT(Y.obs, Y.rep, funcT, ifplot = FALSE)
Arguments
Y.obs
a vector which indicates the observed data set
Y.rep
a matrix which indicates the reference data sets
funcT
a function which defines the dignostic statistic
ifplot
a logical value which indicates whether plot the dignostic statistics