1
$\begingroup$

For a project on scalar-on-function regression using a truncated basis expansion of the coefficient function, I am trying to understand why an even number of Fourier basis functions is only useful in very specific scenarios.

We are using the R package FDA and the function create.bspline.basis() in particular. This function has an argument nbasis which specifies the desired number of basis functions to be created for further usage. (Documentation: https://www.rdocumentation.org/packages/fda/versions/5.5.1/topics/create.fourier.basis)

In the documentation it says about the choice of nbasis:

nbasis: positive odd integer: If an even number is specified, it is rounded up to the nearest odd integer to preserve the pairing of sine and cosine functions. An even number of basis functions only makes sense when there are always only an even number of observations at equally spaced points; that case can be accommodated using dropind = nbasis-1 (because the bases are const, sin, cos, ...).

Sadly, I can't really follow the reasoning in this short excerpt and the documentation of this package contains multiple errors. For example the argument "dropind = nbasis-1" drops a completely different function than is indicated by the documentation and creates complex errors down the line due to other implementation choices of the package. So I sadly cannot just rely on this information being true.

It would be great if somebody could explain why it is reasonable mathematically to always choose pairs of sine and cosine functions and why this is only not the case in the described scenario.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.