Learn R Programming

dual.spls (version 0.1.4)

d.spls.plot: Plots the coefficient curve of a Dual-SPLS regression

Description

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.

Usage

d.spls.plot(mod.dspls,ncomp)

Value

no return value

Arguments

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.

Author

Louna Alsouki François Wahl

Details

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.

Examples

Run this code
### 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)

Run the code above in your browser using DataLab