How to interpret the returned vector of loess(vx,vy,span)
Hello everyone,
I am using "loess" function to generate a regression curve for my experimental data. I understand that loess(vx,vy,span) returns a vector that includes the smoothed coordinates of vy and information of a set of 2nd order polynomials. I know I can use interp(vs,vx,vy,x) to get the interpolated y-value corresponding to x using the output vector vs from loess. However, I want to know the meaning of the values in the vector returned by loess, so that I can utilize the regression curve generated by loess in my own program for subsequent calculations. In other words, I want to reproduce the smoothed curve generated by loess without using interp function. Here is an example, suppose
vx=[0, 10, 15, 20],
and vy=[0, 227.04, 362.78, 517.35],
loess(vx, vy, 2) will then give,
loess(vx, vy, 2)=[1, 52, 0.067, 226.546, 363.622, 517.047, -0.067, 0.494, -0.842, 0.303, 1, 4, 2, 7, 5, 1.049e3, 849, 1, 1, 1, 0, 0, 0, 0, 10, 0, 15, 0, 0, 0, 0, -0.1, 20.1, -1.877, 19.412, 520.281, 32.372, 226.546, 25.807, 0.067, 19.475, 363.622, 29.064, 1, 1, 1, 1, 1, 1.251, 0.67, 0.455, 2].
So far, what I've figured out is that, the first element, 1, of the returned vector, indicates that it was loess that had been used; the 2nd element, 52, indicates that there is a total of 52 elements in this vector; the last element, 2, is the value of 'span' used in loess; the 3rd to 6th elements are the smoothed coordinates (or knodes on the smoothed curve) of vy; and the 7th to 10th elements are the difference between the original vy and the smoothed vy (3rd element to 6th elements in this case). MathCAD's manual mentioned that loess(vx,vy,span) uses a set of 2nd polynomials that best fit the neighborhood of x and y data values in vx and vy. So, I believe the rest elements in the returned loess vector must be information of these 2nd polynomials, but I just couldn't figured out what and where exactly are they. My question is basically how interp(vs,vx,vy,x) interprets the vs vector produced by loess. Thank you.

