Formula based interface to the ROSA algorithm following the style of the pls
package.
rosa(
formula,
ncomp,
Y.add,
common.comp = 1,
data,
subset,
na.action,
scale = FALSE,
weights = NULL,
validation = c("none", "CV", "LOO"),
internal.validation = FALSE,
fixed.block = NULL,
design.block = NULL,
canonical = TRUE,
...
)
An object of classes rosa
and mvr
having several associated printing (rosa_results
) and plotting methods (rosa_plots
).
Model formula accepting a single response (block) and predictor block names separated by + signs.
The maximum number of ROSA components.
Optional response(s) available in the data set.
Automatically create all combinations of common components up to length common.comp
(default = 1).
The data set to analyse.
Expression for subsetting the data before modelling.
How to handle NAs (no action implemented).
Optionally scale predictor variables by their individual standard deviations.
Optional object weights.
Optional cross-validation strategy "CV" or "LOO".
Optional cross-validation for block selection process, "LOO", "CV3", "CV5", "CV10" (CV-number of segments), or vector of integers (default = FALSE).
integer vector with block numbers for each component (0 = not fixed) or list of length <= ncomp (element length 0 = not fixed).
integer vector containing block numbers of design blocks
logical indicating if canonical correlation should be use when calculating loading weights (default), enabling B/W maximization, common components, etc. Alternatively (FALSE) a PLS2 strategy, e.g. for spectra response, is used.
Additional arguments for cvseg
or rosa.fit
ROSA is an opportunistic method sequentially selecting components from whichever block explains the response most effectively. It can be formulated as a PLS model on concatenated input block with block selection per component. This implementation adds several options that are not described in the literature. Most importantly, it opens for internal validation in the block selection process, making this more robust. In addition it handles design blocks explicitly, enables classification and secondary responses (CPLS), and definition of common components.
Liland, K.H., Næs, T., and Indahl, U.G. (2016). ROSA - a fast extension of partial least squares regression for multiblock data analysis. Journal of Chemometrics, 30, 651–662, doi:10.1002/cem.2824.
Overviews of available methods, multiblock
, and methods organised by main structure: basic
, unsupervised
, asca
, supervised
and complex
.
Common functions for computation and extraction of results and plotting are found in rosa_results
and rosa_plots
, respectively.
data(potato)
mod <- rosa(Sensory[,1] ~ ., data = potato, ncomp = 10, validation = "CV", segments = 5)
summary(mod)
# For examples of ROSA results and plotting see
# ?rosa_results and ?rosa_plots.
Run the code above in your browser using DataLab