Learn R Programming

BNPdensity (version 2019.7.9)

plot_prior_number_of_components: Plot the prior number of components for a stable process and for a Dirichlet process with Alpha = 1.

Description

This plots the prior distribution on the number of components for the stable process. The Dirichlet process is provided for comparison.

Usage

plot_prior_number_of_components(n, Gama, Alpha = 1, grid = NULL)

Arguments

n

Number of data points

Gama

Numeric constant. 0 <= Gama <=1.

Alpha

Numeric constant. Total mass of the centering measure for the Dirichlet process.

grid

Level of truncation when computing the expectation. Defaults to n. If greater than n, it is fixed to n.

Value

A plot with the prior distribution on the number of components.

Examples

Run this code
# NOT RUN {
plot_prior_number_of_components(50, 0.4)
# }

Run the code above in your browser using DataLab