| bw_cv_kre_polysph | R Documentation | 
Computes least squares cross-validation bandwidths for kernel regression estimation with polyspherical response and scalar predictor. It computes both the bandwidth that minimizes the cross-validation loss and its "one standard error" variant.
bw_cv_kre_polysph(X, Y, d, p = 0, h_grid = bw.nrd(X) * 10^seq(-2, 2, l =
  100), plot_cv = TRUE, fast = TRUE)
| X | a vector of size  | 
| Y | a matrix of size  | 
| d | vector of size  | 
| p | degree of local fit, either  | 
| h_grid | bandwidth grid where to optimize the cross-validation loss.
Defaults to  | 
| plot_cv | plot the cross-validation loss curve? Defaults to  | 
| fast | use the faster and equivalent version of the cross-validation
loss? Defaults to  | 
A similar output to glmnet's cv.glmnet
is returned.
A list with the following fields:
| h_min | the bandwidth that minimizes the cross-validation loss. | 
| h_1se | the largest bandwidth within one standard error of the minimal cross-validation loss. | 
| cvm | the mean of the cross-validation loss curve. | 
| cvse | the standard error of the cross-validation loss curve. | 
n <- 50
X <- seq(0, 1, l = n)
Y <- r_path_s2r(n = n, r = 1, sigma = 0.1, spiral = TRUE)[, , 1]
bw_cv_kre_polysph(X = X, Y = Y, d = 2, p = 0)
bw_cv_kre_polysph(X = X, Y = Y, d = 2, p = 1, fast = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.