Learn R Programming

geoCount (version 1.150120)

BMCT: Perform Bayesian Model Checking

Description

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

Value

A vector of p-value and RPS.

See Also

repYeb, repYpost, pRPS, plot_pRPS

Examples

Run this code
## Not run: 
# Yrep.eb <- repYeb(N.sim=2000, loc, L, res.m, est = "mode")
# funcT <- function(Y){ max(Y)-min(Y) }
# BMCT(Y, Yrep.eb, funcT, ifplot=TRUE)  ## End(Not run)

Run the code above in your browser using DataLab