Learn R Programming

CNPBayes (version 1.2.2)

DensityModel: Constructor for DensityModel class

Description

Instantiates an instance of 'DensityModel' (or 'DensityBatchModel') from a MarginalModel or BatchModel object. See the corresponding class for additional details and examples.

Usage

DensityModel(object, merge = FALSE)

Arguments

object
see showMethods(DensityModel)
merge
Logical. Whether to use kmeans clustering to cluster the component means using the estimated modes from the overall density as the centers for the kmeans function.

Value

An object of class 'DensityModel'

See Also

DensityModel-class kmeans

Examples

Run this code
     dm <- DensityModel(MarginalModelExample)

Run the code above in your browser using DataLab