spline derivation

1.6k Views Asked by At

Assume the following representation for cubic splines with $T$ interior knots is given. Let

$g(Y)=\sum_{j=0}^3 \alpha_j Y_j+\sum_{t=1}^T \gamma_t (Y-\zeta_t)_{+}^{3}$

where $(Y-\zeta_t)_{+}:= max\{0,Y-\zeta_t\}$

1) How can we show that the natural boundary conditions for natural cubic splines results in the following linear constraints on the coefficients:

$\alpha_2 = 0, \sum_{t=1}^T \gamma_t=0$
$\alpha_3 = 0, \sum_{t=1}^T \zeta_t\gamma_t=0$

2) How can we use result of part (1) to derive the basis
$V_1(Y) = 1, V_2(Y) = Y, V_{t+2}(Y) = g_t(Y) − g_{t-1}(Y), t = \{1, ..., T − 2\}$ where

$g_t(Y)=\frac{(Y-\zeta_t)_{+}^{3}-(Y-\zeta_T)_{+}^{3}}{\zeta_T-\zeta_t}$

Thanks!

2

There are 2 best solutions below

3
On BEST ANSWER

I'm going to prove 1) using a slightly different notation. As for 2) it's my first time seeing people use such a basis, I need some time. Could you give the source where this is from?

A natural spline of degree $2m+1$ is a function $s\in C^{2m}(\mathbb{R})$ that reduces to a polynomial of degree $\leq2m+1$ in each inner interval and to a polynomial of degree at most $m$ in $(-\infty,t_{1})$ and $(t_{n},\infty)$.

Theorem Every natural spline can be represented using truncated power functions as follows $$ s(x)=\sum_{k=0}^{m}\alpha_{k}x^{k}+\sum_{i=1}^{n}\beta_{i}(x-x_{i})_{+}^{2m+1} $$ with the coefficient conditions, $$ \sum_{i=1}^{n}\beta_{i}x_{i}^{k}=0,\qquad k=0,1,\ldots m $$

The coefficient conditions follow from the natural spline condition, $$ 0=s^{(m+1)}(x)\bigg|_{x\geq x_{n}}=\sum_{i=1}^{n}\beta_{i}(2m+1)(2m)\dots(m+1)(x-x_{i})^{m}, $$ the Binomial Theorem, $(x-x_{i})^{m}=\sum_{k=0}^{m}\binom{m}{k}x_{i}^{m-k}(-x_{i})^{k}$, and demanding that coefficients for each $k$ of this zero-polynomial vanish.

For cubic spline, $m=1$, note that the front low-degree poly is linear and the conditions are $\sum\beta_{i}=0$ and $\sum\beta_{i}x_{i}=0$.

0
On

Since part (1) has been solved, I just answer the part (2). The notation may be a little different.

Based on the definition,

$$f(x)=\beta_0+\beta_1x+\beta_2x^2+\beta_3x^3+\sum\limits_{i=1}^K\theta_i(x-\xi_i)^3_{+}$$

Using the conclusion in (1).

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^K\theta_i(x-\xi_i)^3_{+}$$

Extract the last two elements from the summation

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^{K-2}\theta_i(x-\xi_i)^3_{+}+\theta_{K-1}(x-\xi_{K-1})_{+}^3+\theta_{K}(x-\xi_{K})_{+}^3$$

Using the results in (1) to solve $\theta_K$ and $\theta_{K-1}$,

$$\theta_K+\theta_{K-1}=-\sum\limits_{i=1}^{K-2}\theta_i=a$$

$$\theta_K\xi_K+\theta_{K-1}\xi_{K-1}=-\sum\limits_{i=1}^{K-2}\theta_i\xi_i=b$$

then

$$\theta_K=\frac{b-a\xi_{K-1}}{\xi_K-\xi_{K-1}}$$

$$\theta_{K-1}=\frac{-b+a\xi_{K}}{\xi_K-\xi_{K-1}}$$

Apply this results to $f(x)$

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^{K-2}\theta_i(x-\xi_i)^3_{+}+\frac{-b+a\xi_{K}}{\xi_K-\xi_{K-1}}(x-\xi_{K-1})_{+}^3+\frac{b-a\xi_{K-1}}{\xi_K-\xi_{K-1}}(x-\xi_{K})_{+}^3$$

Since $d_{K-1}(X)=\frac{(x-\xi_{K-1})_{+}^3-(x-\xi_{K})_{+}^3}{\xi_K-\xi_{K-1}}$

Using this condition,

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^{K-2}\theta_i(x-\xi_i)^3_{+}-b\cdot d_{K-1}(X)+\frac{a\xi_{K}}{\xi_K-\xi_{K-1}}(x-\xi_{K-1})_{+}^3+\frac{-a\xi_{K-1}}{\xi_K-\xi_{K-1}}(x-\xi_{K})_{+}^3$$

then

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^{K-2}\theta_i(x-\xi_i)^3_{+}-b\cdot d_{K-1}(x)+\frac{a\xi_{K}}{\xi_K-\xi_{K-1}}(x-\xi_{K-1})_{+}^3+\frac{-a\xi_{K-1}+a\xi_{K}-a\xi_{K}}{\xi_K-\xi_{K-1}}(x-\xi_{K})_{+}^3$$

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^{K-2}\theta_i(x-\xi_i)^3_{+}-b\cdot d_{K-1}(x)+a\xi_Kd_{K-1}(x)+a(x-\xi_K)^3_{+}$$

Extract $\theta_i$

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^{K-2}\theta_i[(x-\xi_i)^3_{+}-(x-\xi_K)^3_{+}+(\xi_i-\xi_K)d_{K-1}(x)]$$

Extract $(\xi_K-\xi_i)$

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^{K-2}\theta_i(\xi_K-\xi_i)[\frac{(x-\xi_i)^3_{+}-(x-\xi_K)^3_{+}}{\xi_K-\xi_i}-d_{K-1}(x)]$$

Then get the result,

$$f(x)=\beta_0+\beta_1x+\sum\limits_{i=1}^{K-2}\theta_i(\xi_K-\xi_i)[d_i(x)-d_{K-1}(x)]$$

Done.