Learn R Programming

fdars (version 0.3.3)

GCV.S: Generalized Cross-Validation for Smoother Selection

Description

Compute GCV criterion: RSS / (1 - tr(S)/n)^2

Usage

GCV.S(S.type, tt, h, y, Ker = "norm", w = NULL)

Value

The GCV score.

Arguments

S.type

Function to compute smoother matrix.

tt

Evaluation points.

h

Bandwidth parameter.

y

Response vector.

Ker

Kernel type.

w

Optional weights.

Examples

Run this code
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