The comparison is made WITHIN each draw, the same theta on both sides. BDA3 flags values below 0.01 or above 0.99 as major failures.
References
Gelman, Carlin, Stern, Dunson, Vehtari & Rubin (2013), Bayesian Data Analysis, 3rd edition, Section 6.3.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Ppcrep(V, V)
#> $p_value
#> [1] 1
#>
#> $p_two_sided
#> [1] 0
#>
#> $n_extreme
#> [1] 8
#>
#> $t_obs_mean
#> [1] 4.5
#>
#> $t_rep_mean
#> [1] 4.5
#>
#> $S
#> [1] 8
#>
#> $extreme
#> [1] 1
#>
#> $method
#> [1] "Posterior predictive p-value, BDA3 Section 6.3"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
