Creates linear interpolation

create_approximation(x, y, start = 0)

Arguments

x

time points

y

values to interpolate

start

rescales the x to x-start (useful to chain interventions properly)

Value

An interpolation function, like the one created by approxfun (stats package)