\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\) \(\newcommand{\W}[1]{ \; #1 \; }\)
bilinear#
View page sourcedismod_at Bilinear Interpolation#
Age Grid#
We are given a grid of \(M\) age values \(\{ a_i \; | \; i = 0, \ldots , M-1 \}\).
Time Grid#
We are also given a grid of \(N\) time values \(\{ t_j \; | \; j = 0, \ldots , N-1 \}\).
Function Grid#
In addition, we are given a grid of function values to be interpolated
Interpolant#
The corresponding interpolating function at age \(\alpha\) and time \(s\), \(f( \alpha , s )\) is defined as follows:
Bilinear#
Consider the case where there is an index pair \(i < M-1\), \(j < N-1\) such that \(a_i \leq \alpha \leq a_{i+1}\) and \(t_j \leq s \leq t_{j+1}\). In this case the function is defined by
Below Minimum Age#
Consider the case where \(\alpha < a_0\) and there is an index \(j < N-1\) such that \(t_j \leq s \leq t_{j+1}\). In this case the function is defined by
Above Maximum Age#
Consider the case where \(a_{M-1} < \alpha\) and there is an index \(j < N-1\) such that \(t_j \leq s \leq t_{j+1}\). In this case the function is defined by
Below Minimum Time#
Consider the case where \(s < t_0\) and there is an index \(i < M-1\) such that \(a_i \leq \alpha \leq a_{i+1}\). In this case the function is defined by
Above Maximum Time#
Consider the case where \(t_{N-1} < s\) and there is an index \(i < M-1\) such that \(a_i \leq \alpha \leq a_{i+1}\). In this case the function is defined by
Outside Both Limits#
If \(\alpha < a_0\) and \(s < t_0\), \(f( \alpha , s ) = v_{0,0}\).
If \(\alpha < a_0\) and \(t_{N-1} < s\), \(f( \alpha , s ) = v_{0,N-1}\).
If \(a_{M-1} < \alpha\) and \(t_{N-1} < s\), \(f( \alpha , s ) = v_{M-1,N-1}\).
If \(a_{M-1} < \alpha\) and \(s < t_0\), \(f( \alpha , s ) = v_{M-1,0}\).
Plotting#
Functions of age and time are usually plotted with age on the vertical axis and time on the horizontal axis. This is opposite the usual convention where the first variable is plotted on the horizontal axis and the second variable on the vertical axis.