est_dens: One dimensional projection estimator

Description Usage Arguments Value Examples

View source: R/est_dens.R

Description

Given a sample of i.i.d. real random variables with common density, and a basis of class Basis this function calculates the projection estimator of this density.

Usage

1
est_dens(basis, data, D)

Arguments

basis

an object of class Basis

data

a numeric vector containing a sample of i.i.d. real random variables with common density

D

a natural number smaller or equal to the dimension of the vector space generated by basis

Value

The projection estimator of the density of data given basis

Examples

1
2
3
4
5
6
# example with the trigonometric basis
d <- 100
trig_bas <- Trig_Basis$new(d)
data <- runif(100)
estimated_density <- est_dens(trig_bas, data, 10)
estimated_density

nschaefer1211/OSE documentation built on Dec. 31, 2020, 12:59 a.m.