fastmerge function

Pre-binning of Data Points.

Pre-binning of Data Points.

Numerical tolerance problems in non-parametric regression makes it necessary for pre-binning of data points. This procedure is implicitly performed by most of the regression function in R. This function implements this procedure with a given tolerance level. data

fastmerge(DataMat, w = NULL, tol = 1e-04)

Arguments

  • DataMat: a numeric matrix/vector with rows as data points.
  • w: an optional numeric vector of the same length as xx; Defaults to all elements 1.
  • tol: a numeric value providing the tolerance for identifying duplicates with respect to the first column.

Details

If two values in the first column of DataMat are separated by a value less than tol then the corresponding rows are merged.

Returns

A list including the elements - DataMat: a numeric matrix/vector with rows sorted with respect to the first column.

  • w: obtained weights corresponding to the merged points.

See Also

See also the function smooth.spline.

Author(s)

Arun Kumar Kuchibhotla, arunku@wharton.upenn.edu.

Examples

args(fastmerge) x <- runif(100,-1,1) y <- runif(100,-1,1) DataMat <- cbind(x, y) tmp <- fastmerge(DataMat)
  • Maintainer: Arun Kumar Kuchibhotla
  • License: GPL-2
  • Last published: 2017-04-25

Useful links