Example 1. Polynomial Spline. For the polynomial
spline of order on
, the model space is
. Define an inner product on as
. Define inner product on as
Table lists statements inside ssr for four simple polynomial splines. We assume variables , and have been calculated based on Bernoulli polynomials. All expressions of the reproducing kernels in this table are available in our library. Note that the domain under construction () is restricted to while the domain under construction () is an arbitrary interval . Thus one needs to transform a variable into before using rk functions in the third column. The rk functions in the fourth column assume the domain for any fixed . One can calculate the reproducing kernel on by a translation, for example .
|m||splines||under construction ()||under construction ()|
Example 2. Stein Estimate. A James-Stein shrinkage estimate can be regarded as the solution to () with , and (Gu, 2002).
For shrinkage toward a constant,
For shrinkage toward zero,
Example 3. Periodic Spline. For the -th order periodic spline on (Wahba, 1990),
Example 4. Thin plate spline (TPS) (Wahba, 1990).
For a TPS of order on with ,
The true kernel discussed in Gu and Wahba (1993a) is calculated by the function tp. It takes longer to compute the true kernel and is only necessary for calculating posterior variances.
Example 5. Spline on the sphere is an extension of both
the periodic spline defined on the unit circle and the TPS on .
Let the domain be
, where is the unit sphere.
Any point on can be represented
, where (
is the longitude and (
the latitude. Define
ssr(y~t1+t2, rk=sphere(cbind(t1,t2),order=3))where and are longitude and latitude respectively.
Example 6. -spline. The penalty term, , is usually used to penalize the roughness of the function . However, sometimes it is advantageous to use other forms of penalty. For example, prior information may be incorporated or even estimated by a penalty to the departure of the non-parametric function from a specific parametric model (Wahba, 1990; Heckman and Ramsay, 2000). Let be a linear differential operator , where denotes the th derivative operator and the 's are continuous real-valued weight functions. The spline estimate with the penalty is called an -spline. See Heckman and Ramsay (2000) and Gu (2002) for more details about the -spline. The lspline function in our library calculates reproducing kernels for the following four -spline models.
(a) Suppose that . If prior knowledge suggests that is close to a linear combination of and , one may use , and . Then
The statement for fitting such a model is
If we want to include the constant in the model space, then , ,
(b) Suppose that
. If prior knowledge suggests that
is close to a linear combination of and , one
, and . Then
(c) Suppose that . If prior knowledge suggests that is close to the logistic function , one may use , and . Then
(d) Suppose that . If prior knowledge suggests that is close to a linear combination of , , and , one may use , and . Then