BNPdensity (version 2023.3.8)

plot.NRMI2: Plot the density estimate and the 95% credible interval

Description

The density estimate is the mean posterior density computed on the data points.

Usage

# S3 method for NRMI2
plot(x, ...)

Value

A graph with the density estimate, the 95% credible interval and a histogram of the data

Arguments

x

A fitted object of class NRMI2

...

Further arguments to be passed to generic function, ignored at the moment

Examples

Run this code
## Example for non censored data

data(acidity)
out <- MixNRMI2(acidity, Nit = 20)
plot(out)

## Example for censored data

data(salinity)
out <- MixNRMI2cens(salinity$left, salinity$right, Nit = 20)
plot(out)

Run the code above in your browser using DataLab