dBNPdens.BNPdens {BNPmix}R Documentation

Evaluate estimated univariate densities at a given point

Description

The method dBNPdens provides an approximated evaluation of estimated univariate densities at a given point, for a BNPdens class object.

Usage

## S3 method for class 'BNPdens'
dBNPdens(object, x)

Arguments

object

a BNPdens object (only if univariate);

x

the point where to evaluate the density.

Value

a numeric value

Examples

data_toy <- c(rnorm(100, -3, 1), rnorm(100, 3, 1))
grid <- seq(-7, 7, length.out = 50)
est_model <- PYdensity(y = data_toy, mcmc = list(niter = 200, nburn = 100),
                       output = list(grid = grid))
x <- 1.4
dBNPdens(est_model, x)


[Package BNPmix version 1.0.2 Index]