Computes the periodic covariance function: $$k(s, t) = \sigma^2 \exp\left(-\frac{2\sin^2(\pi|s-t|/p)}{\ell^2}\right)$$
Details
The periodic covariance function produces sample paths that are periodic with the specified period. It is useful for modeling seasonal or cyclical patterns in functional data.
Examples
# Generate periodic function samples
cov_func <- kernel.periodic(period = 0.5, length_scale = 0.5)
t <- seq(0, 2, length.out = 100)
fd <- make.gaussian.process(n = 5, t = t, cov = cov_func)
plot(fd)