check_pp_individual: Calculate Bayesian P-Values for each check

Description Usage Arguments Details Value

View source: R/jags_check.R

Description

The Bayesian P-Value, in this implementation, calculates the summary statistics supplied by the user, such as "max" for the observed response variable. As the JAGS code runs, a prediction is generated for every observation using the estimated parameters.

Usage

1
check_pp_individual(.list, .check, .response_check)

Arguments

.list

The output of jags_model_run

.check

A character vector of summary stats to perform

.response_check

The actual statistics from the response variable

Details

This code checks to see whether the actual summary statistic in the observed response vector is greater than the summary statistic generated from the predicted values. If the model was an appropriate choice for the data, the actual summary statistic would be greater than approximately 50% of the summary statistics generated by the predicted values. That is, the closer a Bayesian P-Value is to 0.5, the better the fit. The closer the Bayesian P-Value is to 0 or 1, the worse the fit.

Value

A numeric vector with the Bayesian P value for each summary statistic for each iteration.


jdtrat/mickjaggr documentation built on Dec. 20, 2021, 10:06 p.m.