Description Usage Arguments Details Value Author(s) References See Also Examples
plotting device for penalized PLS on splines transformed variables
1 2 3 4 5 | graphic.ppls.splines(X,y,lambda,
add.data,select,ncomp,deg,
order,nknot,reduce.knots,
kernel,window.size)
|
X |
matrix of input data |
y |
vector of response data |
add.data |
logical value. If TRUE, the data |
select |
Logical value. If |
lambda |
vector of candidate parameters lambda for the penalty term. Default value is NULL |
ncomp |
Number of PLS components, default value is 1 |
deg |
Degree of the splines. Default value is 3 |
order |
Order of the differences to be computed for the penalty term. Default value is 2. |
nknot |
number of knots. Default value is 20 for all variables. |
kernel |
Logical value. If kernel=TRUE, the kernelized version of penalized PLS is computed. Default value is kernel=TRUE |
reduce.knots |
Logical variable. If |
window.size |
vector of length size 2. Determines the number of plots on one page. Default is c(3,3), that is 3 rows and 3 columns. |
This function computes a nonlinear regression
model with Penalized Partial Least Squares using penalized PLS on B-spline transformed variables. The model parameters have to be provided - for proper model selection, we recommend to determine the optiaml parameters with ppls.splines.cv. Consult Kraemer, Boulesteix, and Tutz (2008) for details.
The function plots the additive components for each variable.
WARNING: If add.data=TRUE, the function also plots the data X and y. While it seems convenient to compare the data (x_j,y) and the fitted functions (x_j,f_j(x_j)), one should keep in mind that only the sum of the fitted functions f_j(x) are an approximation of y.
ppls.coefficients |
The regression coefficients for the transformed variables. |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # ------------------------------------------------------
# load boston housing data
library(MASS)
data(Boston)
y<-Boston[,14]
X<-Boston[,-14]
X<-X[,-4] # remove categorical variable
X<-as.matrix(X)
# ----------------------------------------------------------------------
# plot ppls results for some random parameters
# with variable selection , and with data (add.data=TRUE)
dummy<-graphic.ppls.splines(X,y,lambda=100,ncomp=5,add.data=TRUE,select=TRUE,window.size=c(3,4))
# without variable selection and without data
dummy<-graphic.ppls.splines(X,y,lambda=100,ncomp=5,add.data=FALSE,select=FALSE,window.size=c(3,4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.