get_red.Rd
Computes R2 and redundancies between variables and scores from a PLS regression.
get_red(object)
an object of class mvr
from pls
package.
A list with the following elements :
R2 and redundancies between X variables and X scores
R2 and redundancies between Y variables and X scores
R2 and redundancies between X variables and Y scores
R2 and redundancies between Y variables and Y scores
cumulative R2 and redundancies between X variables and X scores
cumulative R2 and redundancies between Y variables and X scores
cumulative R2 and redundancies between X variables and Y scores
cumulative R2 and redundancies between Y variables and Y scores
Martens, H., Næs, T. (1989) Multivariate calibration. Chichester: Wiley.
Tenenhaus, M. (1998) La Regression PLS. Theorie et Pratique. Editions TECHNIP, Paris.
library(pls)
data(yarn)
pls <- mvr(density ~ NIR,
ncomp = 5,
data = yarn,
validation = "CV",
method = "oscorespls")
res <- get_red(pls)
str(res)
#> List of 8
#> $ Xt : num [1:269, 1:5] 0.4309 0.0607 0.2128 0.2985 0.2962 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:269] "Rd" "V1" "V2" "V3" ...
#> .. ..$ : chr [1:5] "t1" "t2" "t3" "t4" ...
#> $ Yt : num [1:2, 1:5] 0.98122 0.98122 0.00128 0.00128 0.01387 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:2] "Rd" "density"
#> .. ..$ : chr [1:5] "t1" "t2" "t3" "t4" ...
#> $ Xu : num [1:269, 1:5] 0.4469 0.0353 0.1799 0.2827 0.3023 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:269] "Rd" "V1" "V2" "V3" ...
#> .. ..$ : chr [1:5] "u1" "u2" "u3" "u4" ...
#> $ Yu : num [1:2, 1:5] 1 1 0.0188 0.0188 0.0175 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:2] "Rd" "density"
#> .. ..$ : chr [1:5] "u1" "u2" "u3" "u4" ...
#> $ Xtcum: num [1:269, 1:5] 0.4309 0.0607 0.2128 0.2985 0.2962 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:269] "Rd" "V1" "V2" "V3" ...
#> .. ..$ : chr [1:5] "t1" "t2" "t3" "t4" ...
#> $ Ytcum: num [1:2, 1:5] 0.981 0.981 0.983 0.983 0.996 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:2] "Rd" "density"
#> .. ..$ : chr [1:5] "t1" "t2" "t3" "t4" ...
#> $ Xucum: num [1:269, 1:5] 0.4469 0.0353 0.1799 0.2827 0.3023 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:269] "Rd" "V1" "V2" "V3" ...
#> .. ..$ : chr [1:5] "u1" "u2" "u3" "u4" ...
#> $ Yucum: num [1:2, 1:5] 1 1 1.02 1.02 1.04 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:2] "Rd" "density"
#> .. ..$ : chr [1:5] "u1" "u2" "u3" "u4" ...