Description Usage Arguments Details Value References See Also Examples

Given a vector or a matrix `x`

, this function constructs a frequency table
associated to appropriate intervals covering the range of `x`

.

1 | ```
binning(x, y, breaks, nbins)
``` |

`x, y` |
a vector or a matrix with either one or two columns.
If |

`breaks` |
either a vector or a matrix with two columns (depending on the dimension of |

`nbins` |
the number of intervals on the |

This function is called automatically (under the default settings)
by some of the functions of the `sm`

library when the sample size is
large, to allow handling of datasets of essentially unlimited size.
Specifically, it is used by `sm.density`

, `sm.regression`

, `sm.ancova`

,
`sm.binomial`

and `sm.poisson`

.

In the vector case, a list is returned containing the following elements:
a vector `x`

of the midpoints of the bins excluding those with 0 frequecies,
its associated matrix `x.freq`

of frequencies, the coodinateds of the
`midpoints`

, the division points, and the complete vector of observed
frequencies `freq.table`

(including the 0 frequencies), and the vector
`breaks`

of division points.
In the matrix case, the returned value is a list with the following
elements: a two-dimensional matrix `x`

with the coordinates of the
midpoints of the two-dimensional bins excluding those with 0 frequecies,
its associated matrix `x.freq`

of frequencies, the coordinates of the
`midpoints`

, the matrix `breaks`

of division points, and the observed
frequencies `freq.table`

in full tabular form.

Bowman, A.W. and Azzalini, A. (1997).
*Applied Smoothing Techniques for Data Analysis:
the Kernel Approach with S-Plus Illustrations.*
Oxford University Press, Oxford.

`sm`

, `sm.density`

, `sm.regression`

, `sm.binomial`

, `sm.poisson`

, `cut`

, `table`

1 2 3 4 5 6 7 8 9 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.