Learn R Programming

bda (version 1.1.1-7)

binning: Data binning.

Description

To bin raw data and prepare data for finite mixture model fitting.

Usage

binning(x, scale=1, method='nearest')

Arguments

x
Sample data before binning.
scale
The scale of data. Default: scale=1.
method
Method to round the data: up/down, or to the nearest integers.

Details

Raw data need to be prepared to have specific formats to be analyzed using the FMMBD functions. In summary, data should have three columns: x = center of the bins, widths = width of the bins, and counts = counts (frequencies) of the bins.

If data are prepared manually, default scale=1. One may need to transform data first.

References

Wang, B. and Wertelecki, W. (2011) Density estimation from data with rounding errors, Computational Statistics and Data Analysis, (submitted)

See Also

bfmm

Examples

Run this code
data(birth)
(ofc = binning(birth$Head))
(bwt = binning(birth$Weight, scale=100))

Run the code above in your browser using DataLab