Description Usage Arguments Details Value See Also Examples
Create a spls.constraint object by fitting a constraint spls with the spls.hybrid
function on a ‘bootsPLS’ object
1 |
object |
a ‘bootsPLS’ object', as obtained from |
auto.tune |
Logical. If TRUE, tune the optimal number of component (ncomp) and which variables to select on each component (signature). It only works with |
X |
Input matrix of dimension n * p; each row is an observation vector. |
Y |
Factor with at least q>2 levels. |
ncomp |
How many component are to be included in the sPLS-DA analysis? |
signature |
A list containing which variables to keep on each component. |
alpha |
Level of the test. |
limit |
Vector of maximal number of genes to include on each component. |
showProgress |
Logical. If TRUE, shows the progress of the algorithm. |
This function fit a spls.hybrid
on the variables included in signature
, which can be an input or internally calculated by setting auto.tune=TRUE
. If object
is given as an input, (X, Y) are ignored. If auto.tune=TRUE
, ncomp, signature
are ignored.
A 'spls.constraint' object is returned for which plotIndiv
is available.
The outputs are the ones from spls.hybrid
, plus
data |
A list of the input data X, Y, Y.mat (dummy matrix) and of |
prediction
, CI.prediction
, plotIndiv
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
data(MSC)
X=MSC$X
Y=MSC$Y
boot=bootsPLS(X=X,Y=Y,ncomp=3,many=5,kCV=5)
# with a bootsPLS object and auto.tune=TRUE
fit=fit.model(boot,auto.tune=TRUE)
plot(fit$component.selection)
plot(fit$variable.selection)
# with a bootsPLS object and ncomp=2
fit=fit.model(boot,ncomp=2)
# with a bootsPLS object and ncomp/signature as input
signature=fit$data$signature
fit=fit.model(boot,ncomp=2,signature=signature)
# with no bootsPLS object
fit=fit.model(X=X,Y=Y,ncomp=2,signature=signature)# bootsPLS object
plotIndiv(fit,ind.names=FALSE, legend=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.