binning {ks} | R Documentation |
Linear binning for 1- to 4-dimensional data.
binning(x, H, h, bgridsize, xmin, xmax, supp=3.7)
x |
matrix of data values |
H |
bandwidth matrix |
h |
scalar bandwidth |
xmin |
vector of minimum values for grid |
xmax |
vector of maximum values for grid |
supp |
effective support for standard normal is [-supp, supp ] |
bgridsize |
vector of binning grid sizes |
Code is used courtesy of Matt Wand. Default bgridsize
are:
401 (d=1), rep(151, 2), rep(51, 3), rep(21,4).
Returns a list with 2 fields
counts |
linear binning counts |
eval.points |
vector (d=1) or list (d>2) of grid points in each dimension |
Wand, M.P. & Jones, M.C. (1995) Kernel Smoothing. Chapman & Hall. London.
data(unicef) binning(x=unicef) binning(x=unicef, xmin=c(0, 20), xmax=c(350, 100), H=diag(2), bgridsize=c(201,201))