fregre.plm: Semi-functional partially linear model with scalar response.

View source: R/fregre.plm.R

fregre.plmR Documentation

Semi-functional partially linear model with scalar response.


Computes functional regression between functional (and non functional) explanatory variables and scalar response using asymmetric kernel estimation.


  h = NULL,
  Ker = AKer.norm,
  metric = metric.lp,
  type.CV = GCV.S,
  type.S = S.NW,
  par.CV = list(trim = 0, draw = FALSE),
  par.S = list(w = 1),



an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under Details.


List that containing the variables in the model.


Bandwidth, h>0. Default argument values are provided as the sequence of length 51 from 2.5%–quantile to 25%–quantile of the distance between the functional data, see h.default.


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


Metric function, by default metric.lp.


Type of cross-validation. By default generalized cross-validation GCV.S method.


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


List of parameters for type.CV: trim, the alpha of the trimming
and draw=TRUE.


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


Further arguments passed to or from other methods.


An extension of the non-parametric functional regression models is the semi-functional partial linear model proposed in Aneiros-Perez and Vieu (2005). This model uses a non-parametric kernel procedure as that described in The output y is scalar. A functional covariate X and a multivariate non functional covariate Z are considered.

y = r(X)+∑_(j=1:p) Z_j β_j+ε

The unknown smooth real function r is estimated by means of

\hat{r}_{h}(X)=∑_(i=1:n) w_{n,h}(X,X_i) (Y_i - Z_i^{T} β.est_h)

where W_h is the weight function:

w_{n,h}(X,X_i)= K( d( X , X_i )/h ) / ∑_(j=1:n) K( d( X, X_j )/h ) with smoothing parameter h, an asymmetric kernel K and a metric or semi-metric d. In fregre.plm() by default W_h is a functional version of the Nadaraya-Watson-type weights (type.S=S.NW) with asymmetric normal kernel (Ker=AKer.norm) in L_2
(metric=metric.lp with p=2). The unknown parameters β_j for the multivariate non functional covariates are estimated by means of β.est_j=(Z_h'Z_h)^{-1} Z_h^{T}Z_h where Z_h=(I-W_h)Z with the smoothing parameter h. The errors ε are independent, with zero mean, finite variance σ^2 and E[ε|Z_1,...,Z_p,X(t)]=0.

The first item in the data list is called "df" and is a data frame with the response and non functional explanatory variables, as link{lm}. If non functional data into the formula then lm regression is performed.
Functional variable (fdata or fd class) is introduced in the second item in the data list. If only functional variable into the formula then is performed.

The function estimates the value of smoothing parameter or the bandwidth h through Generalized Cross-validation GCV criteria. It computes the distance between curves using the metric.lp, although you can also use other metric function.
Different asymmetric kernels can be used, see Kernel.asymmetric.


  • call The matched call.

  • fitted.values Estimated scalar response.

  • residuals y minus fitted values.

  • df.residual The residual degrees of freedom.

  • H Hat matrix.

  • r2 Coefficient of determination.

  • sr2 Residual variance.

  • y Scalar response.

  • fdataobj Functional explanatory data.

  • XX Non functional explanatory data.

  • mdist Distance matrix between curves.

  • betah beta coefficient estimated

  • data List that containing the variables in the model.

  • Ker Asymmetric kernel used.

  • h.opt Value that minimizes CV or GCV method.

  • h Smoothing parameter or bandwidth.

  • data List that containing the variables in the model.

  • gcv GCV values.

  • formula formula.


Manuel Febrero-Bande, Manuel Oviedo de la Fuente


Aneiros-Perez G. and Vieu P. (2005). Semi-functional partial linear regression. Statistics & Probability Letters, 76:1102-1110.

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.

See Also

See Also as: predict.fregre.plm and summary.fregre.fd
Alternative methods: fregre.lm, and


## Not run: 


# with 2nd derivative of functional data

## End(Not run)

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