SO-PLS-PM is the use of SO-PLS for path-modelling. This particular function is used to compute effects (explained variances) in sub-paths of the directed acyclic graph.
sopls_pm(
X,
Y,
ncomp,
max_comps = min(sum(ncomp), 20),
sel.comp = "opt",
computeAdditional = FALSE,
sequential = FALSE,
B = NULL,
k = 10,
type = "consecutive",
simultaneous = TRUE
)# S3 method for SO_TDI
print(x, showComp = TRUE, heading = "SO-PLS path effects", digits = 2, ...)
sopls_pm_multiple(
X,
ncomp,
max_comps = min(sum(ncomp), 20),
sel.comp = "opt",
computeAdditional = FALSE,
sequential = FALSE,
B = NULL,
k = 10,
type = "consecutive"
)
# S3 method for SO_TDI_multiple
print(x, heading = "SO-PLS path effects", digits = 2, ...)
An object of type SO_TDI
containing total, direct and indirect effects, plus
possibly additional effects and standard deviations (estimated by bootstrapping).
A list
of input blocks (of type matrix
).
A matrix
of response(s).
An integer
vector giving the number of components per block or a single integer for common number of components.
Maximum total number of components.
A character
or integer
vector indicating the type ("opt" - minimum error / "chi" - chi-squared reduced) or exact number of components in selections.
A logical
indicating if additional components should be computed.
A logical
indicating if sequential component optimization should be applied.
An integer
giving the number of bootstrap replicates for variation estimation.
An integer
indicating number of cross-validation segments (default = 10).
A character
for selecting type of cross-validation segments (default = "consecutive").
logical
indicating if simultaneous orthogonalisation on intermediate blocks should be performed (default = TRUE).
An object of type SO_TDI
.
A logical
indicating if components should be shown in print (default = TRUE).
A character
giving the heading of the print.
An integer
for selecting number of digits in print.
Not implemented
sopls_pm
computes 'total', 'direct', 'indirect' and 'additional' effects for the 'first' versus the
'last' input block by cross-validated explained variances. 'total' is the explained variance when doing
regression of 'first' -> 'last'. 'indirect' is the the same, but controlled for the intermediate blocks.
'direct' is the left-over part of the 'total' explained variance when subtracting the 'indirect'. Finally,
'additional' is the added explained variance of 'last' for each block following 'first'.
sopls_pm_multiple
is a wrapper for sopls_pm
that repeats the calculation for all pairs of blocks
from 'first' to 'last'. Where sopls_pm
has a separate response, Y, signifying the 'last' block,
sopls_pm_multiple
has multiple 'last' blocks, depending on sub-path, thus collects the response(s)
from the list of blocks X.
When sel.comp = "opt", the number of components for all models are optimized using cross-validation within the ncomp and max_comps supplied. If sel.comp is "chi", an optimization is also performed, but parsimonious solutions are sought through a chi-square chriterion. When setting sel.comp to a numeric vector, exact selection of number of components is performed.
When setting B to a number, e.g. 200, the procedures above are repeated B times using bootstrapping to estimate standard deviations of the cross-validated explained variances.
Menichelli, E., Almøy, T., Tomic, O., Olsen, N. V., & Næs, T. (2014). SO-PLS as an exploratory tool for path modelling. Food quality and preference, 36, 122-134.
Næs, T., Romano, R., Tomic, O., Måge, I., Smilde, A., & Liland, K. H. (2020). Sequential and orthogonalized PLS (SO-PLS) regression for path analysis: Order of blocks and relations between effects. Journal of Chemometrics, e3243.
Overviews of available methods, multiblock
, and methods organised by main structure: basic
, unsupervised
, asca
, supervised
and complex
.
# Single path for the potato data:
data(potato)
pot.pm <- sopls_pm(potato[1:3], potato[['Sensory']], c(5,5,5), computeAdditional=TRUE)
pot.pm
# Corresponding SO-PLS model:
# so <- sopls(Sensory ~ ., data=potato[c(1,2,3,9)], ncomp=c(5,5,5), validation="CV", segments=10)
# maageSeq(pot.so, compSeq = c(3,2,4))
# All path in the forward direction for the wine data:
data(wine)
pot.pm.multiple <- sopls_pm_multiple(wine, ncomp = c(4,2,9,8))
pot.pm.multiple
Run the code above in your browser using DataLab