The data we are interpolating is monotonically increasing (for example, a car's odometer reading). We have two types of points we'd like the solution to interpolate through. The solution surface must pass through critical points. The solution does not have to pass through non-critical points, but must aim to minimize distance to them. See attached image.
From my understanding local regression options such as LOESS can create a smoothed interpolation solution, but cannot be forced to cross through certain points. An interpolating spline is forced to cross all points, but will not try to optimize its knot parameters to reduce distance to non-critical points. Do any packages in R achieve the type of solution sought?
Thank you.
Best Answer
You may want to use weighted loess, as in:
One issue with this approach is that weighted regression assumes that weights are known exactly, while this is very rarely the case. Some ideas on estimating weights for the case of weighted linear regression can be found here. Quite often however even a vague idea on differences in weights may work better than nothing. For example, here even though there was no guarantee that the loess fitted line will go exactly through the "important" points, this was very nearly the case with a rather arbitrary choice of weights.