Computes R2 and redundancies between variables and scores from a PLS regression.

get_red(object)

Arguments

object

an object of class mvr from pls package.

Value

A list with the following elements :

Xt

R2 and redundancies between X variables and X scores

Yt

R2 and redundancies between Y variables and X scores

Xu

R2 and redundancies between X variables and Y scores

Yu

R2 and redundancies between Y variables and Y scores

Xtcum

cumulative R2 and redundancies between X variables and X scores

Ytcum

cumulative R2 and redundancies between Y variables and X scores

Xucum

cumulative R2 and redundancies between X variables and Y scores

Yucum

cumulative R2 and redundancies between Y variables and Y scores

References

Martens, H., Næs, T. (1989) Multivariate calibration. Chichester: Wiley.

Tenenhaus, M. (1998) La Regression PLS. Theorie et Pratique. Editions TECHNIP, Paris.

Author

Nicolas Robette

See also

Examples

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" ...