Functions > Data Analysis > Curve Fitting > Localized Polynomial Regression
Localized Polynomial Regression
loess(vx, vy, span) or loess(Mx, vy, span)—Returns a vector which interp uses to find a set of second-order polynomials that best fit the neighborhood of x and y data values in vx and vy in the least-squares sense. The size of the neighborhood is controlled by span. The loess function can also be used for multivariate regression, where a matrix Mxy of k independent variables and a vector of dependent values, vy, are used to fit second-order polynomial surfaces in k dimensions.
The PTC Mathcad implementation of loess is a variation (with some approximations made for the sake of speed) on the algorithm described in Smoothing by Local Regression: Principles and Methods, W. S. Cleveland and C. L. Loader (1996).
Arguments
vx, vy are vectors of real data values of the same length.
span is a positive real number specifying the size of the data neighborhood. Use larger values of span when the data behaves very differently over different ranges of x. A good default value is span = 0.75. As span gets larger, loess becomes equivalent to a second order polynomial.
Mx is a matrix of real data values. There is one column for each independent variable (k columns). rows(Mx) = rows(vy).