Learn R Programming

fda.usc (version 2.1.0)

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

Description

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

Usage

fregre.plm(
  formula,
  data,
  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),
  ...
)

Value

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

Arguments

formula

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.

data

List that containing the variables in the model.

h

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.

Ker

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

metric

Metric function, by default metric.lp.

type.CV

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

type.S

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

par.CV

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

par.S

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

...

Further arguments passed to or from other methods.

Author

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

Details

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 fregre.np. The output \(y\) is scalar. A functional covariate \(X\) and a multivariate non functional covariate \(Z\) are considered.

$$y =r(X)+\sum_{j=1}^{p}{Z_j\beta_j}+\epsilon$$

The unknown smooth real function \(r\) is estimated by means of $$\hat{r}_{h}(X)=\sum_{i=1}^{n}{w_{n,h}(X,X_{i})(Y_{i}-Z_{i}^{T}\hat{\beta}_{h})}$$ where \(W_h\) is the weight function:

\(w_{n,h}(X,X_{i})=\frac{K(d(X,X_i)/h)}{\sum_{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 \(\beta_j\) for the multivariate non functional covariates are estimated by means of \(\hat{\beta}_j=(\tilde{Z}_{h}^{T}\tilde{Z}_{h})^{-1}\tilde{Z}_{h}^{T}\tilde{Z}_{h}\) where \(\tilde{Z}_{h}=(I-W_{h})Z\) with the smoothing parameter \(h\). The errors \(\epsilon\) are independent, with zero mean, finite variance \(\sigma^2\) and \(E[\epsilon|Z_1,\ldots,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 fregre.np.cv 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.

References

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

See Also

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

Examples

Run this code
if (FALSE) {
data(tecator)
x=tecator$absorp.fdata[1:129]
dataf=tecator$y[1:129,]

f=Fat~Water+x
ldata=list("df"=dataf,"x"=x)
res.plm=fregre.plm(f,ldata)
summary(res.plm)

# with 2nd derivative of functional data
x.fd=fdata.deriv(x,nderiv=2)
f2=Fat~Water+x.fd
ldata2=list("df"=dataf,"x.fd"=x.fd)
res.plm2=fregre.plm(f2,ldata2)
summary(res.plm2)
}

Run the code above in your browser using DataLab