Learn R Programming

assist (version 3.1.9)

periodic: Calculate Reproducing Kernels for Periodic Polynomial Splines with Period 1

Description

Return a matrix evaluating reproducing kernels for periodic polynomial splines at observed points.

Usage

periodic(s, t=s, order=2)

Value

a matrix with the numbers of row and column equal to the lengths of s and t respectively. The [i, j] element is the reproducing kernel evaluated at (s[i], t[j]).

Arguments

s

a numeric vector.

t

an optional vector. Default is the same as s.

order

an optional integer sepcifying the order of the polynomial spline. Default is 2 for the periodic cubic spline.

Details

The general formula of the reproducing kernel is sum of an infinite series, which is approximated by taking the first 50 terms. For the case of order=2, the close form is available and used.

References

Wahba, G. (1990). Spline Models for Observational Data. SIAM, Vol. 59.

Gu, C. (2001). Smoothing Spline ANOVA Modes. Chapman and Hall.

See Also

cubic, lspline

Examples

Run this code
if (FALSE) {
x<- seq(0, 1, len=100)
periodic(x, order=3)
}

Run the code above in your browser using DataLab