seedpls | R Documentation |
Returns partial least squares estimates through iterative projections. And, the function results in subclass "seedpls".
seedpls(X, Y, u=5, scale=FALSE)
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 |
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 |
######## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.