Generate a triangular interpolation function with the parameters of your choice.
Source:R/interpolations.R
getTriangularInterpolation.RdProduces an interpolation function of the form described in interpolations.
Arguments
- y.mid
The value or values to which midpoints between observations should be set. Good choices are: mean(y.in) for stand-alone interpolations; 0 for composite method interpolations among absolute residuals (in log or linear space); 1 for composite method interpolations among relative residuals (again, log or linear space).
Value
A function of the form described in interpolations, i.e.,
accepting the arguments dates.in, y.in, and dates.out
and returning predictions from a triangular interpolation function for
y.out. That function will use the y.mid argument supplied
here.