fregre.np.cv {fda.usc} | R Documentation |
Cross-validation functional regression with scalar response using kernel estimation.
Description
Computes functional regression between functional explanatory variables and scalar response using asymmetric kernel estimation by cross-validation method.
Usage
fregre.np.cv(
fdataobj,
y,
h = NULL,
Ker = AKer.norm,
metric = metric.lp,
type.CV = GCV.S,
type.S = S.NW,
par.CV = list(trim = 0),
par.S = list(w = 1),
...
)
Arguments
fdataobj |
|
y |
Scalar response with length |
h |
Bandwidth, |
Ker |
Type of asymmetric kernel used, by default asymmetric normal kernel. |
metric |
Metric function, by default |
type.CV |
Type of cross-validation. By default generalized
cross-validation |
type.S |
Type of smothing matrix |
par.CV |
List of parameters for |
par.S |
List of parameters for |
... |
Arguments to be passed for |
Details
The non-parametric functional regression model can be written as follows
where the unknown smooth real function
is estimated using kernel estimation by means of
where is an kernel function (see
Ker
argument), h
is
the smoothing parameter and is a metric or a semi-metric (see
metric
argument).
The function estimates the value of smoothing parameter (also called
bandwidth) h
through Generalized Cross-validation GCV
criteria, see GCV.S
or CV.S
.
The function estimates the value of smoothing parameter or the bandwidth
through the cross validation methods: GCV.S
or
CV.S
. It computes the distance between curves using the
metric.lp
, although any other semimetric could be used (see
semimetric.basis
or semimetric.NPFDA
functions).
Different asymmetric kernels can be used, see
Kernel.asymmetric
.
Value
Return:
-
call
The matched call. -
residuals
y
minusfitted values
. -
fitted.values
Estimated scalar response. -
df.residual
The residual degrees of freedom. -
r2
Coefficient of determination. -
sr2
Residual variance. -
H
Hat matrix. -
y
Response. -
fdataobj
Functional explanatory data. -
mdist
Distance matrix betweenx
andnewx
. -
Ker
Asymmetric kernel used. -
gcv
CV or GCV values. -
h.opt
smoothing parameter or bandwidth that minimizes CV or GCV method. -
h
Vector of smoothing parameter or bandwidth. -
cv
List with the fitted values and residuals estimated by CV, without the same curve.
Author(s)
Manuel Febrero-Bande, Manuel Oviedo de la Fuente manuel.oviedo@udc.es
References
Ferraty, F. and Vieu, P. (2006). Nonparametric functional data analysis. Springer Series in Statistics, New York.
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
See Also as: fregre.np
,
summary.fregre.fd
and predict.fregre.fd
.
Alternative method: fregre.basis.cv
and
fregre.np.cv
.
Examples
## Not run:
data(tecator)
absorp=tecator$absorp.fdata
ind=1:129
x=absorp[ind,]
y=tecator$y$Fat[ind]
Ker=AKer.tri
res.np=fregre.np.cv(x,y,Ker=Ker)
summary(res.np)
res.np2=fregre.np.cv(x,y,type.CV=GCV.S,criteria="Shibata")
summary(res.np2)
## Example with other semimetrics (not run)
res.pca1=fregre.np.cv(x,y,Ker=Ker,metric=semimetric.pca,q=1)
summary(res.pca1)
res.deriv=fregre.np.cv(x,y,Ker=Ker,metric=semimetric.deriv)
summary(res.deriv)
x.d2=fdata.deriv(x,nderiv=1,method="fmm",class.out='fdata')
res.deriv2=fregre.np.cv(x.d2,y,Ker=Ker)
summary(res.deriv2)
x.d3=fdata.deriv(x,nderiv=1,method="bspline",class.out='fdata')
res.deriv3=fregre.np.cv(x.d3,y,Ker=Ker)
summary(res.deriv3)
## End(Not run)