# fregre.plm: Semi-functional partially linear model with scalar response. In fda.usc: Functional Data Analysis and Utilities for Statistical Computing

 fregre.plm R Documentation

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


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

### 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)+∑_(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 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.

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

### Author(s)

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

### 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 as: predict.fregre.plm and summary.fregre.fd
Alternative methods: fregre.lm, fregre.np and fregre.np.cv

### Examples

## Not run:
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)

## End(Not run)


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