fda.usc (version 2.0.1)

summary.fdata.comp: Correlation for functional data by Principal Component Analysis

Description

Compute correlation principal components of functional data and scalar response y.

Usage

# S3 method for fdata.comp
summary(object, y = NULL, biplot = TRUE, corplot = FALSE, ...)

Arguments

object

fdata.comp class object calculated by: fdata2pc, fdata2pls, fregre.pc or fregre.pls.

y

(optional) The argument is only necessary if corplot=TRUE.

biplot

=TRUE draw the biplot and PC (or PLS) components.

corplot

=TRUE draw correlations between y and PC (or PLS) components.

Further arguments passed to or from other methods.

Value

If corplot=TRUE, are displaying the biplot between the PC (or PLS) components. If corplot=TRUE, are displaying the correlations between the PC (or PLS) components and response y. If ask=TRUE, draw each graph in a window, waiting to confirm the change of page with a click of the mouse or pressing ENTER. If ask=FALSE draw graphs in one window.

References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988). The New S Language. Wadsworth \& Brooks/Cole.

Venables, W. N. and B. D. Ripley (2002). Modern Applied Statistics with S. Springer-Verlag.

See Also

See Also as fdata2pc, fdata2pls and cor

Examples

Run this code
# NOT RUN {
n= 200
tt= seq(0,1,len=101)
x0<-rproc2fdata(n,tt,sigma="wiener")
x1<-rproc2fdata(n,tt,sigma=0.1)
x<-x0*3+x1
beta = tt*sin(2*pi*tt)^2
fbeta = fdata(beta,tt)
y<-inprod.fdata(x,fbeta)+rnorm(n,sd=0.1)
pc1=fdata2pc(x)
summary(pc1,y)
pls1=fdata2pls(x,y)
summary(pls1,cor=TRUE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace