Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

GCCV.S

The generalized correlated cross-validation (GCCV) score.


Description

The generalized correlated cross-validation (GCV) score.

Usage

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

Arguments

y

Response vectorith length n or 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 S.KNN.

criteria

The penalizing function. By default "Rice" criteria. "GCCV1","GCCV2","GCCV3","GCV") 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

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

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

cor(ε_i,ε_j ) =σ

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 ) =σ

Value

Returns GCCV score calculated for input parameters.

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.

Author(s)

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

References

Carmack, P. S., Spence, J. S., and Schucany, W. R. (2012). Generalised correlated cross-validation. Journal of Nonparametric Statistics, 24(2):269–282.

Oviedo de la Fuente, M., Febrero-Bande, M., Pilar Munoz, and Dominguez, A. Predicting seasonal influenza transmission using Functional Regression Models with Temporal Dependence. arXiv:1610.08718. https://arxiv.org/abs/1610.08718

See Also

See Also as optim.np.
Alternative method (independent case): GCV.S

Examples

## Not run: 
data(tecator)
x=tecator$absorp.fdata
x.d2<-fdata.deriv(x,nderiv=)
tt<-x[["argvals"]]
dataf=as.data.frame(tecator$y)
y=tecator$y$Fat
# plot the response
plot(ts(tecator$y$Fat))

nbasis.x=11;nbasis.b=7
basis1=create.bspline.basis(rangeval=range(tt),nbasis=nbasis.x)
basis2=create.bspline.basis(rangeval=range(tt),nbasis=nbasis.b)
basis.x=list("x.d2"=basis1)
basis.b=list("x.d2"=basis2)
ldata=list("df"=dataf,"x.d2"=x.d2)
# No correlation
res.gls=fregre.gls(Fat~x.d2,data=ldata, 
                   basis.x=basis.x,basis.b=basis.b)
# AR1 correlation                   
res.gls=fregre.gls(Fat~x.d2,data=ldata, correlation=corAR1(),
                   basis.x=basis.x,basis.b=basis.b)
GCCV.S(y,res.gls$H,"GCCV1",W=res.gls$W)
res.gls$gcv

## End(Not run)

fda.usc

Functional Data Analysis and Utilities for Statistical Computing

v2.0.2
GPL-2
Authors
Manuel Febrero Bande [aut], Manuel Oviedo de la Fuente [aut, cre], Pedro Galeano [ctb], Alicia Nieto [ctb], Eduardo Garcia-Portugues [ctb]
Initial release
2020-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.