d.spls.plot | R Documentation |
The function dual.spls.plot
provides the regression coefficient curves of a Dual-SPLS model for a specified number of components
and the mean of the original data plot.
d.spls.plot(mod.dspls,ncomp)
mod.dspls |
is a fitted Dual-SPLS object. |
ncomp |
a positive integer or a numeric vector of the number of Dual-SPLS components to consider. |
The plots allow the visualization of the results by comparing the mean of the original data to the coefficients regression in the
case of a Dual-SPLS regression. The plots provided correspond to the Dual-SPLS coefficients for each ncomp
desired.
no return value
Louna Alsouki François Wahl
### load dual.spls library
library(dual.spls)
### constructing the simulated example
n <- 100
p <- 50
nondes <- 20
sigmaondes <- 0.5
data=d.spls.simulate(n=n,p=p,nondes=nondes,sigmaondes=sigmaondes)
X <- data$X
y <- data$y
#fitting the Dual-SPLS lasso model
mod.dspls.lasso <- d.spls.lasso(X=X,y=y,ncp=10,ppnu=0.9,verbose=TRUE)
ncomp=c(5,6,7)
d.spls.plot(mod.dspls.lasso,ncomp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.