FourierBasis {USP} | R Documentation |
Fourier basis functions
Description
Computes the values of the one-dimensional Fourier basis functions at a vector of locations x
and with a vector of frequencies m
. The scaling factor of 2\pi
is included, so that
the function returns, e.g., \sqrt{2} \cos(2\pi m x)
.
Usage
FourierBasis(a, m, x)
Arguments
a |
Sine or cosine; |
m |
Vector of frequencies |
x |
Vector of locations |
Value
Returns the values of \sqrt{2} \cos(2\pi m x)
.
References
Berrett TB, Kontoyiannis I, Samworth RJ (2021). “Optimal rates for independence testing via U-statistic permutation tests.” Annals of Statistics, to appear.
Examples
e=FourierBasis(1,1:100,0.01); plot(0.01*(1:100),e,type="l")
e=FourierBasis(0,1,0.01*(1:100)); plot(0.01*(1:100),e,type="l")
FourierBasis(1,1:3,0.1*(1:10))
[Package USP version 0.1.2 Index]