BagHistfp: Density Estimation with Bagged Frequency Polygons (BagHistFP)

View source: R/BagHistfp.R

BagHistfpR Documentation

Density Estimation with Bagged Frequency Polygons (BagHistFP)

Description

Estimate the density of a univariate data vector using BagHistFP. First, obtain bootstrap samples of the input vector data. For each sample, a histogram is computed using an optimized number of break points. On top of it, a frequency polygon is obtained. The BagHistFP estimation is the mean of the individual frequency polygons.

Usage

BagHistfp(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 BagHistFP

Examples

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

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