Learn R Programming

fda.usc (version 0.9.4)

fregre.pc: Functional Regression with scalar response using Principal Components Analysis.

Description

Computes functional regression between functional explanatory variables and scalar response using Principal Components Analysis.

Usage

fregre.pc(fdataobj,y,l=1:3,norm=TRUE)

Arguments

fdataobj
fdata class object.
y
Scalar response with length n.
l
Vector of principal comoponents.
norm
=TRUE the norm of eigenvectors (rotation) is 1.

Value

  • Return:
  • callThe matched call of fregre.pc function.
  • beta.estbeta coefficient estimated of class fdata
  • coefficientsA named vector of coefficients.
  • fitted.valuesEstimated scalar response.
  • lambdaEigenvalues of the covariance/correlation matrix.
  • vsA matrix whose columns contain the eigenvectors selected by l index.
  • ZMatrix of centered fdata multiplied by the eigenvalues vs.
  • HHat matrix.
  • dfThe residual degrees of freedom.
  • residualsy-fitted values.
  • r2Coefficient of determination.
  • sr2Residual variance.
  • fdataobjFunctional explanatory data.
  • yScalar response.
  • pfFormula used in lm function
  • pcpc.svd.fdata object.
  • lIndex of principal components selected.
  • lmlm object.

Details

The principal components are calculated by svd decomposition in the pc.svd.fdata function.

References

Cai TT, Hall P. 2006. Prediction in functional linear regression. Annals of Statistics 34: 2159{-}2179. Cardot H, Ferraty F, Sarda P. 1999. Functional linear model. Statistics and Probability Letters 45: 11{-}22. Hall P, Hosseini{-}Nasab M. 2006. On properties of functional principal components analysis. Journal of the Royal Statistical Society B 68: 109{-}126.

See Also

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

Examples

Run this code
data(tecator)
absorp=tecator$absorp.fdata
ind=1:129
x=absorp[ind,]
y=tecator$y$Fat[ind]

res=fregre.pc(x,y)
summary(res)
pc.cor(x,y,1:8)
pc.fdata(x,1:8,draw=FALSE)
res2=fregre.pc(x,y,l=c(1,3,4))
summary(res2)
x.d=fdata.deriv(x)
pc.cor(x.d,y,1:8)
pc.fdata(x.d,1:8,draw=FALSE)
res3=fregre.pc(x.d,y,l=c(1,3,4))
summary(res3)

Run the code above in your browser using DataLab