BvM diagnostic for the mean functional under a DP prior.
Source:R/ghbvm.R
morie_ghosal_bernstein_von_mises.RdBvM diagnostic for the mean functional under a DP prior.
Usage
morie_ghosal_bernstein_von_mises(
x,
theta0 = NULL,
B = 500,
seed = 0,
deterministic_seed = NULL
)Arguments
- x
Numeric data vector.
- theta0
Optional null value for the mean functional.
- B
Integer number of bootstrap draws (default 500).
- seed
Integer RNG seed (default 0).
- deterministic_seed
Optional integer; if supplied, RNG state is derived via
morie_det_rng()keyed on ("ghbvm", deterministic_seed) so Py<->R streams agree on the canonical fixture. WhenNULL(default) behaviour is unchanged.
Value
Named list with estimate, se, theta_hat, z_ks_stat, z_ks_pvalue, wald, wald_pvalue, n, B, method.
Examples
morie_ghosal_bernstein_von_mises(x = rnorm(50))
#> $estimate
#> [1] 0.02925501
#>
#> $se
#> [1] 0.1195717
#>
#> $theta_hat
#> [1] 0.02393097
#>
#> $z_ks_stat
#> [1] 0.04385294
#>
#> $z_ks_pvalue
#> [1] 0.2914242
#>
#> $wald
#> [1] NA
#>
#> $wald_pvalue
#> [1] NA
#>
#> $n
#> [1] 50
#>
#> $B
#> [1] 500
#>
#> $method
#> [1] "BvM for mean functional (Bayesian bootstrap)"
#>