Lavine (1992). On the level-m dyadic partition the prior puts
independent Beta(alpha_m, alpha_m) splits at every node;
conjugacy updates each to Beta(alpha_m + n_L, alpha_m + n_R),
and the posterior mean density multiplies the expected splits
along the path to each cell.
Usage
morie_bnd_polya_tree(
y,
grid = NULL,
tree_depth = 6L,
alpha = 1,
lo = NULL,
hi = NULL
)
Arguments
- y
sample.
- grid
evaluation points; data-driven when NULL.
- tree_depth
partition levels; resolution 2^tree_depth.
- alpha
the scale in alpha_m = alpha m^2.
- lo, hi
support of the base measure; padded data range
when NULL.
Value
list: grid, density, mass, tree_depth, alpha, alpha_rule,
n, method.
Details
The canonical alpha_m = alpha m^2 is what makes the prior put
probability one on ABSOLUTELY CONTINUOUS distributions (Kraft
1964); a CONSTANT alpha_m behaves like a Dirichlet process,
whose realisations are discrete. Larger alpha smooths toward the
uniform base measure, smaller alpha follows the empirical
histogram, and both limits are tested.
References
Lavine (1992), Annals of Statistics 20:1222-1235;
Ferguson (1974), Annals of Statistics 2:615-629; Kraft (1964),
J. Applied Probability 1:385-388; Hanson (2006), *JASA*
101:1548-1565.
Examples
set.seed(1)
morie_bnd_polya_tree(stats::rnorm(100), grid = c(-1, 0, 1))$density
#> [1] 0.1983917 0.4398726 0.2311912