Description Usage Arguments Details Value Author(s) References See Also Examples
This function allows statistical analysis of three data matrices arranged in an L-shape to be modelled by lpls. Two versions of lpls is implemented, exo- and endo-lpls. See references for details.
1 2 |
X1 |
A data matrix with |
X2 |
A data matrix with |
X3 |
A data matrix with |
npc |
The number of latent components to be extracted from each matrix |
doublecenter |
Logical, whether |
scaledata |
A logical vector with three elements indicating whether the columns of the three matrices should be standardized with the standard deviation. |
type |
Type of lpls. Character, either |
impute |
Logical. Should missing values be imputed by SVD before analysis? If |
niter |
The latent vectors are found using the NIPALS algorithm. This parameter defines the number of iterations for the NIPALS. |
subsetX1 |
an optional vector specifying a subset of observations (rows of X1 and X2) to be used in the fitting process |
subsetX3 |
an optional vector specifying a subset of variables (columns of X2 and rows X3) to be used in the fitting process |
See chapter Three-block data modeling by endo- and exo-LPLS regression by S?b?, S., Martens, M and Martens, M. for details
on the endo- and exo-LPSL algorithms. Endo-LPLS is an inward regression of X1 and X3 on X2, whereas exo-LPSL is an outward
regression of X2 on X1 and X3. The exo_ort
algorithm returns orthogonal scores and should be chosen for visual exploration
in correlation loading plots. If exo-LPSL with prediction is the main purpose of the model then the non-orthogonal exo
type LPSL should be chosen for which the predict function has prediction implemented.
call |
The function call |
ncomp |
The number of components extracted |
coefficients |
Regression coefficient matrices: |
scores |
The latent (normalized) scorevectors as extracted from NIPALS. One set for each extracted component of the LPLS model.
Thus, all scores matrices have |
loadings |
Loading matrices: |
corloadings |
Correlation loadings parallel to the regular P-loadings but without dimension. |
means |
|
data |
The original data matrices. |
residuals |
The residual matrices after subtracting the contribution from the |
options |
|
vars |
Proportions of explained un-corrected sums of squares for each component for each data matrix. |
Solve S<c3><a6>b<c3><b8>
S<c3><a6>b<c3><b8>, S., Martens, M. and Martens H. (2010) Three-block data modeling by endo- and exo-LPLS regression. In Handbook of Partial Least Squares: Concepts, Methods and Applications. Esposito Vinzi, V.; Chin, W.W.; Henseler, J.; Wang, H. (Eds.). Springer.
plot.lpls
,predict.lpls
,lplsCV
,
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 |
#Simulating data
simdata <- lpls.sim()
X1 <- simdata$X1
X2 <- simdata$X2
X3 <- simdata$X3
#To run exo-LPLS with orthogonal scores:
fit.exo <- lpls(X1,X2,t(X3), npc=2, type="exo_ort")
#Correlation plots:
plot(fit.exo)
#To run exo-LPLS with non-orthogonal scores:
fit.exo <- lpls(X1,X2,t(X3), npc=2, type="exo")
#Predict X1
predict(fit.exo, X2new=X2,exo.direction="X1")
#Predict X3
predict(fit.exo, X2new=X2,exo.direction="X3")
#To run endo-LPSL:
fit.endo <- lpls(X1,X2,t(X3), npc=2, type="endo")
#Correlation loadings plots
plot(fit.endo)
#Predict X2 from X1 and X3:
predict(fit.endo,X1new=X1,X3new=t(X3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.