Description Usage Arguments Value References Examples

Fits a N-PLS regression model imposing sparsity on `wj`

and `wk`

matrices

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |

`XN` |
A three-way array containing the predictors. |

`Y` |
A matrix containing the response. |

`ncomp` |
Number of components in the projection |

`threshold_j` |
Threshold value on Wj. Scaled between [0, 1) |

`threshold_k` |
Threshold value on Wk. scaled between [0, 1) |

`keepJ` |
Number of variables to keep for each component, ignored if threshold_j is provided |

`keepK` |
Number of 'times' to keep for each component, ignored if threshold_k is provided |

`scale.X` |
Perform unit variance scaling on X? |

`center.X` |
Perform mean centering on X? |

`scale.Y` |
Perform unit variance scaling on Y? |

`center.Y` |
Perform mean centering on Y? |

`conver` |
Convergence criterion |

`max.iteration` |
Maximum number of iterations |

`silent` |
Show output? |

`method` |
Select between L1 penalization (sNPLS), variable selection with Selectivity Ratio (sNPLS-SR) or variable selection with VIP (sNPLS-VIP) |

A fitted sNPLS model

C. A. Andersson and R. Bro. The N-way Toolbox for MATLAB Chemometrics & Intelligent Laboratory Systems. 52 (1):1-4, 2000.

Hervas, D. Prats-Montalban, J. M., Garcia-CaĆ±averas, J. C., Lahoz, A., & Ferrer, A. (2019). Sparse N-way partial least squares by L1-penalization. Chemometrics and Intelligent Laboratory Systems, 185, 85-91.

1 2 3 4 5 6 7 8 9 10 | ```
X_npls<-array(rpois(7500, 10), dim=c(50, 50, 3))
Y_npls <- matrix(2+0.4*X_npls[,5,1]+0.7*X_npls[,10,1]-0.9*X_npls[,15,1]+
0.6*X_npls[,20,1]- 0.5*X_npls[,25,1]+rnorm(50), ncol=1)
#Discrete thresholding
fit <- sNPLS(X_npls, Y_npls, ncomp=3, keepJ = rep(2,3) , keepK = rep(1,3))
#Continuous thresholding
fit2 <- sNPLS(X_npls, Y_npls, ncomp=3, threshold_j=0.5, threshold_k=0.5)
#USe sNPLS-SR method
fit3 <- sNPLS(X_npls, Y_npls, ncomp=3, threshold_j=0.5, threshold_k=0.5, method="sNPLS-SR")
``` |

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.