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

fregre.np

Functional regression with scalar response using non-parametric kernel estimation


Description

Computes functional regression between functional explanatory variables and scalar response using kernel estimation.

Usage

fregre.np(
  fdataobj,
  y,
  h = NULL,
  Ker = AKer.norm,
  metric = metric.lp,
  type.S = S.NW,
  par.S = list(w = 1),
  ...
)

Arguments

fdataobj

fdata class object.

y

Scalar response with length n.

h

Bandwidth, h>0. Default argument values are provided as the 5%–quantile of the distance between fdataobj curves, see h.default.

Ker

Type of asymmetric kernel used, by default asymmetric normal kernel.

metric

Metric function, by default metric.lp.

type.S

Type of smothing matrix S. By default S is calculated by Nadaraya-Watson kernel estimator (S.NW).

par.S

List of parameters for type.S: w, the weights.

...

Arguments to be passed for metric.lp o other metric function.

Details

The non-parametric functional regression model can be written as follows

y = r(X) + ε

where the unknown smooth real function r is estimated using kernel estimation by means of

\hat{r}(X)=(∑_i K(d(X,X_i))y_i/h) / (∑_i K(d(X,X_i)/h)) i=1,...,n

where K is an kernel function (see Ker argument), h is the smoothing parameter and d is a metric or a semi-metric (see metric argument).

The distance between curves is calculated using the metric.lp although any other semimetric could be used (see semimetric.basis or semimetric.NPFDA functions). The kernel is applied to a metric or semi-metrics that provides non-negative values, so it is common to use asymmetric kernels. Different asymmetric kernels can be used, see Kernel.asymmetric.

Value

Return:

  • call The matched call.

  • fitted.values Estimated scalar response.

  • H Hat matrix.

  • residuals y minus fitted values.

  • df The residual degrees of freedom.

  • r2 Coefficient of determination.

  • sr2 Residual variance.

  • y Response.

  • fdataobj Functional explanatory data.

  • mdist Distance matrix between x and newx.

  • Ker Asymmetric kernel used.

  • h.opt smoothing parameter or' bandwidth.

Author(s)

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

References

Ferraty, F. and Vieu, P. (2006). Nonparametric functional data analysis. Springer Series in Statistics, New York.

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. http://www.jstatsoft.org/v51/i04/

Hardle, W. Applied Nonparametric Regression. Cambridge University Press, 1994.

See Also

See Also as: fregre.np.cv, summary.fregre.fd and predict.fregre.fd .
Alternative method: fregre.basis,cand fregre.pc.

Examples

## Not run: 
data(tecator)
absorp=tecator$absorp.fdata
ind=1:129
x=absorp[ind,]
y=tecator$y$Fat[ind]

res.np=fregre.np(x,y,Ker=AKer.epa)
summary(res.np)
res.np2=fregre.np(x,y,Ker=AKer.tri)
summary(res.np2)

# with other semimetrics.
res.pca1=fregre.np(x,y,Ker=AKer.tri,metri=semimetric.pca,q=1)
summary(res.pca1)
res.deriv=fregre.np(x,y,metri=semimetric.deriv)
summary(res.deriv)
x.d2=fdata.deriv(x,nderiv=1,method="fmm",class.out='fdata')
res.deriv2=fregre.np(x.d2,y)
summary(res.deriv2)
x.d3=fdata.deriv(x,nderiv=1,method="bspline",class.out='fdata')
res.deriv3=fregre.np(x.d3,y)
summary(res.deriv3)

## 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.