Description Usage Arguments Details Value Author(s) References See Also Examples

Given a penalized.pls. object, and new data, this function predicts the response for all components.

1 | ```
new.penalized.pls(ppls, Xtest, ytest = NULL)
``` |

`ppls` |
Object returned from penalized.pls |

`Xtest` |
matrix of new input data |

`ytest` |
vector of new response data, optional |

`penalized.pls`

returns the intercepts and regression
coefficients for all penalized PLS components up to `ncomp`

as
specified in the function `penalized.pls`

. `new.penalized.pls`

then computes the estimated response
based on these regression vectors. If `ytest`

is given, the mean squared
error for all components are computed as well.

`ypred` |
matrix of responses |

`mse` |
vector of mean squared errors, if ytest is provided. |

Nicole Kraemer

N. Kraemer, A.-L. Boulsteix, and G. Tutz (2008). *Penalized Partial Least Squares with Applications
to B-Spline Transformations and Functional Data*. Chemometrics and Intelligent Laboratory Systems 94, 60 - 69. http://dx.doi.org/10.1016/j.chemolab.2008.06.009

`penalized.pls`

, `penalized.pls.cv`

, `ppls.splines.cv`

1 2 3 4 5 6 7 8 9 | ```
# see also the example for penalised.pls
X<-matrix(rnorm(50*200),ncol=50)
y<-rnorm(200)
Xtrain<-X[1:100,]
Xtest<-X[101:200,]
ytrain<-y[1:100]
ytest<-X[101:200]
pen.pls<-penalized.pls(Xtrain,ytrain,ncomp=10)
test.error<-new.penalized.pls(pen.pls,Xtest,ytest)$mse
``` |

ppls documentation built on July 21, 2018, 5:02 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.