BagHist: Density Estimation with Bagged Histograms (BagHist)

View source: R/BagHist.R

BagHistR Documentation

Density Estimation with Bagged Histograms (BagHist)

Description

Estimate the density of a univariate data vector using BagHist. First, obtain bootstrap samples of the input vector data. For each sample, a histogram is computed using an optimized number of break points. The BagHist estimation is the mean of the individual histograms.

Usage

BagHist(xx, grid, B = 10)

Arguments

xx

numeric vector.

grid

numeric vector used for evaluation

B

number of bootstrap samples.

Value

numeric vector with the density estimated over the given grid using BagHist

estimation

Examples

x <- rnorm(100)
BagHist(x, seq(-6, 6, length.out = 100), B = 50)

cugliari/bagdenest documentation built on April 6, 2022, 4:52 p.m.