The generalized correlated cross-validation (GCCV) score.
The generalized correlated cross-validation (GCV) score.
GCCV.S( y, S, criteria = "GCCV1", W = NULL, trim = 0, draw = FALSE, metric = metric.lp, ... )
y |
Response vectorith length |
S |
|
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 |
... |
Further arguments passed to or from other methods. |
∑(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 ) =σ
Returns GCCV score calculated for input parameters.
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.
Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@usc.es
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
## 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.