seedpls {seedCCA} | R Documentation |
Partial least squares through iterative projections
Description
Returns partial least squares estimates through iterative projections. And, the function results in subclass "seedpls".
Usage
seedpls(X, Y, u=5, scale=FALSE)
Arguments
X |
numeric matrix (n * p), a set of predictors |
Y |
numeric vector or matrix (n * r), responses (it can be multi-dimensional) |
u |
numeric, the number of projections. The default is 5. |
scale |
logical, FALSE is default. If TRUE, each predictor is standardized with mean 0 and variance 1 |
Value
coef |
the estimated coefficients for each iterative projection upto u |
u |
the maximum number of projections |
X |
Predictors |
Y |
Response |
scale |
status of scaling predictors |
Examples
######## data(cookie) ########
data(cookie)
myseq<-seq(141,651,by=2)
X<-as.matrix(cookie[-c(23,61),myseq])
Y<-as.matrix(cookie[-c(23,61),701:704])
fit.pls1 <- seedpls(X,Y[,1]) ## one-dimensional response
fit.pls2 <- seedpls(X,Y, u=6, scale=TRUE) ## four-dimensional response
[Package seedCCA version 3.1 Index]