# GCV.S: The generalized correlated cross-validation (GCCV) score In fda.usc: Functional Data Analysis and Utilities for Statistical Computing

 GCV.S R Documentation

## The generalized correlated cross-validation (GCCV) score

### Description

Compute the generalized correlated cross-validation (GCV) score.

### Usage

```GCV.S(
y,
S,
criteria = "GCV",
W = NULL,
trim = 0,
draw = FALSE,
metric = metric.lp,
...
)
```

### Arguments

 `y` Matrix of set cases with dimension (`n` x `m`), where `n` is the number of curves and `m` are the points observed in each curve. `S` Smoothing matrix, see `S.NW`, `S.LLR` or `criteria` The penalizing function. By default "Rice" criteria. Possible values are "GCCV1", "GCCV2", "GCCV3", "GCV". `W` Matrix of weights. `trim` The alpha of the trimming. `draw` =TRUE, draw the curves, the sample median and trimmed mean. `metric` Metric function, by default `metric.lp`. `...` Further arguments passed to or from other methods.

### Details

A.-If `trim=0`:

∑(y-y.fit)^2 / (1-tr(C)/n)^2

where S is the smoothing matrix S and:
A.-If C=2SΣ - SΣ S
B.-If C=SΣ
C.-If C=SΣ S'
with Σ is the n x n covariance matrix with cor(ε_i,ε_j ) =σ Note: Provided that C = I and the smoother matrix S is symmetric and idempotent, as is the case for many linear fitting techniques, the trace term reduces to n - tr[S], which is proportional to the familiar denominator in GCV.

### Value

Returns GCV score calculated for input parameters.

### Author(s)

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es

### References

Wasserman, L. All of Nonparametric Statistics. Springer Texts in Statistics, 2006. Hardle, W. Applied Nonparametric Regression. Cambridge University Press, 1994. Febrero-Bande, M., Oviedo de la Fuente, M. (2012). Statistical Computing in Functional Data Analysis: The R Package fda.usc. Journal of Statistical Software, 51(4), 1-28. https://www.jstatsoft.org/v51/i04/

See Also as `optim.np`
Alternative method: `CV.S`

### Examples

```## Not run:
data(phoneme)
mlearn<-phoneme\$learn
tt<-1:ncol(mlearn)
S1 <- S.NW(tt,2.5)
S2 <- S.LLR(tt,2.5)
gcv1 <- GCV.S(mlearn, S1)
gcv2 <- GCV.S(mlearn, S2)
gcv3 <- GCV.S(mlearn, S1,criteria="AIC")
gcv4 <- GCV.S(mlearn, S2,criteria="AIC")
gcv1; gcv2; gcv3; gcv4

## End(Not run)

```

fda.usc documentation built on Oct. 17, 2022, 9:06 a.m.