Description Usage Arguments Details Value See Also Examples
This function creates a binned data set from the raw data
1 | bin(x, brks)
|
x |
a numeric vector of raw data |
brks |
a numeric vector in increasing order, representing the bin values within each of which we want to calculate the frequency of the data |
Given a numeric vector, the function bin
creates a binned data set with bin values provided
by brks
. Fitting mixture models with a large data set may be slow, especially when
we want to fit non-normal mixture models. Binning the data with a relatively
small bin width speeds up the computation of EM algorithm while at the same time keeps the
precision of the estimation result.
The function bin
returns a matrix with three columns, representing the value of the left bin, the value of the right bin and the number of observations in x
that falls in each bin.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.