fastmerge {simest} | R Documentation |
Pre-binning of Data Points.
Description
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.
Usage
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 |
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.
Value
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. |
Author(s)
Arun Kumar Kuchibhotla, arunku@wharton.upenn.edu.
See Also
See also the function smooth.spline
.
Examples
args(fastmerge)
x <- runif(100,-1,1)
y <- runif(100,-1,1)
DataMat <- cbind(x, y)
tmp <- fastmerge(DataMat)