Performs k-fold cross-validation to select the optimal bandwidth parameter (h) for nonparametric functional regression.
fregre.np.cv(
fdataobj,
y,
kfold = 10,
h.range = NULL,
metric = metric.lp,
seed = NULL,
...
)A list with components:
Optimal bandwidth parameter
Mean squared prediction error for each h
Standard error of cv.errors
Fitted model with optimal h
An object of class 'fdata' (functional covariate).
Response vector.
Number of folds for cross-validation (default 10).
Range of bandwidth values to try. If NULL, automatically determined from the distance matrix.
Distance metric function. Default is metric.lp.
Random seed for fold assignment.
Additional arguments passed to the metric function.