Linear binning for 1- to 4-dimensional data.
binning(x, H, h, bgridsize, xmin, xmax, supp=3.7, w, gridtype="linear")
matrix of data values
bandwidth matrix, scalar bandwidth
vector of minimum/maximum values for grid
effective support for standard normal is [-supp,supp]
vector of binning grid sizes
vector of weights. Default is a vector of all ones.
not yet implemented
Returns a list with 2 fields
linear binning counts
vector (d=1) or list (d>=2) of grid points in each dimension
As of ks 1.10.0, binning is available for unconstrained
(non-diagonal) bandwidth matrices. Code is used courtesy of A. &
J. Gramacki, and M.P. Wand. Default bgridsize
are
d=1: 401; d=2: rep(151, 2); d=3: rep(51, 3); d=4: rep(21, 4).
Gramacki, A. & Gramacki, J. (2015) FFT-based fast computation of multivariate kernel estimators with unconstrained bandwidth matrices. URL: arxiv.org/abs/1508.02766.
Wand, M.P. & Jones, M.C. (1995) Kernel Smoothing. Chapman & Hall. London.
# NOT RUN {
data(unicef)
ubinned <- binning(x=unicef)
# }
Run the code above in your browser using DataLab