The function fregre.basis.cv() uses validation criterion defined by argument
type.CV to estimate the number of basis elements and/or the penalized
parameter (lambda) that best predicts the response.
If basis = NULL creates bspline basis.
If the functional covariate fdataobj is in a format raw data,
such as matrix or data.frame, creates an object of class fdata with
default attributes, see fdata.
If basis.x is a vector of number of basis elements and
basis.b=NULL, the function force the same number of elements in the
basis of x and beta.
If basis.x$type=``fourier'' and basis.b$type=``fourier'', the
function decreases the number of fourier basis elements on the
\(min(k_{n1},k_{n2})\), where \(k_{n1}\) and
\(k_{n2}\) are the number of basis element of basis.x and
basis.b respectively.