InfKern: Kernel for infinite-dimensional example

Description Usage Arguments Value References Examples

View source: R/InfKern.R

Description

Function to produce the kernel matrices in the infinite dimensional example described in Section 7.4 of \insertCiteBKS2020USP. Here, a random function is converted to a sequence of coefficients and we use the Fourier basis on these coefficients. This function is an essential part of USPFunctional.

Usage

1
InfKern(X, Ntrunc, M)

Arguments

X

Matrix giving one of the samples to be tested. Each row corresponds to a discretised function, with each column giving the values of the functions at the corresponding grid point.

Ntrunc

The total number of coefficients to look at in the basis expansion of the functional data.

M

The maximum frequency to look at in the Fourier basis.

Value

The kernel matrix for the sample X.

References

\insertRef

BKS2020USP

Examples

1
2
3
4
5
6
7
8
n=10  #number of observations
Ndisc=1000; t=1/Ndisc #functions represented at grid points 1/Ndisc, 2/Ndisc,...,1
X=matrix(rep(0,Ndisc*n),nrow=n)
for(i in 1:n){
 x=rnorm(Ndisc,mean=0,sd=1)
 X[i,]=cumsum(x*sqrt(t))
}
InfKern(X,2,2)

USP documentation built on Jan. 27, 2021, 5:08 p.m.

Related to InfKern in USP...