Learn R Programming

BCClong (version 1.0.3)

BayesT: Goodness of fit.

Description

This function assess the model goodness of fit by calculate the discrepancy measure T(bm(y), bm(Theta)) with following steps (a) Generate T.obs based on the MCMC samples (b) Generate T.rep based on the posterior distribution of the parameters (c) Compare T.obs and T.rep, and calculate the P values.

Usage

BayesT(fit)

Value

Returns a dataframe with length equals to 2 that contains observed and predict value

Arguments

fit

an objective output from BCC.multi() function

Examples

Run this code
#import data
data(example)
fit.BCC <- example
BayesT(fit.BCC)

Run the code above in your browser using DataLab