powered by
Compute GCV criterion: RSS / (1 - tr(S)/n)^2
GCV.S(S.type, tt, h, y, Ker = "norm", w = NULL)
The GCV score.
Function to compute smoother matrix.
Evaluation points.
Bandwidth parameter.
Response vector.
Kernel type.
Optional weights.
tt <- seq(0, 1, length.out = 50) y <- sin(2 * pi * tt) + rnorm(50, sd = 0.1) gcv_score <- GCV.S(S.NW, tt, h = 0.1, y = y)
Run the code above in your browser using DataLab