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

View source: R/MixNRMI1.R

plot.NRMI1R Documentation

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 class 'NRMI1'
plot(x, ...)

Arguments

x

A fitted object of class NRMI1

...

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

Value

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

Examples


## Example for non censored data

data(acidity)
out <- MixNRMI1(acidity, Nit = 50)
plot(out)

## Example for censored data

data(salinity)
out <- MixNRMI1cens(salinity$left, salinity$right, Nit = 50)
plot(out)

konkam/BNPdensity documentation built on March 14, 2024, 7:15 a.m.