View source: R/class_generic.R
| dBNPdens.BNPdens | R Documentation |
The method dBNPdens provides an approximated evaluation of estimated univariate densities at a given point, for a BNPdens class object.
## S3 method for class 'BNPdens'
dBNPdens(object, x)
object |
a |
x |
the point where to evaluate the density. |
a numeric value
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.