Skip to contents

\(f \sim \int PT(\alpha, \pi) dH(\alpha, \pi)\) (Sec. 3.7.2): a Polya tree with the PARTITION itself given a prior.

Usage

morie_polya_tree_mixture(
  x,
  grid = NULL,
  levels = 6L,
  a_scale = 1,
  shifts = NULL
)

Arguments

x

numeric observations.

grid

evaluation points.

levels

depth of each partition.

a_scale

positive multiplier on \(a_m\).

shifts

partition offsets as fractions of a cell width.

Value

list: grid, density, n_components, max_jump, max_jump_single, smoother_than_single, n, method.

Details

This removes an artefact rather than adding flexibility. A single Polya tree is tied to a fixed dyadic partition and its posterior mean has visible DISCONTINUITIES at the partition boundaries – a property of the tessellation, not of the data. Mixing over the partition averages those breaks away. Mirrors morie.fn.gh_c3_14.

References

Ghosal and van der Vaart, Sec. 3.7.2.

Examples

set.seed(1)
morie_polya_tree_mixture(rnorm(200), levels = 4)$smoother_than_single
#> [1] TRUE