如何通过pls模型解释y方差

时间:2019-03-27 14:54:21

标签: r pls

我已经使用“ PLS”软件包计算了PLS模型,并且我想绘制解释的Y方差。 我尝试浏览创建的变量,但是找不到任何与之相关的变量。但是,我可以找到解释的X方差和总X方差。 当我在模型上使用摘要函数时,确实看到了我想要的数字,但是我无法找出如何提取它们以便绘制它们的图。

理想的情况是,如果有一个解释了X和Y方差的默认图,但我认为没有。

library(pls)
data <- (data containing y for Y and everything else for X)
plsmodel <- plsr(y~., ncomp=10, data=data, validation="CV", scale=TRUE, segment.type="random", method="simpls")
View(plsmodel)
summary(plsmodel)
Data:   X dimension: 70 19 
    Y dimension: 70 1
Fit method: simpls
Number of components considered: 10

VALIDATION: RMSEP
Cross-validated using 10 random segments.
       (Intercept)  1 comps  2 comps  3 comps  4 comps  5 comps  6 comps  7 comps  8 comps  9 comps  10 comps
CV           315.5    148.4    121.3    110.7    115.2    114.7    116.3    126.2    145.9    143.4     144.1
adjCV        315.5    147.9    120.2    110.4    112.9    112.8    114.1    123.2    141.4    139.2     139.8

TRAINING: % variance explained
   1 comps  2 comps  3 comps  4 comps  5 comps  6 comps  7 comps  8 comps  9 comps  10 comps
X    86.88    91.50    94.95    95.98    98.19    98.79    99.08    99.28    99.52     99.74
y    79.79    87.86    89.78    92.48    93.26    93.87    94.19    94.40    94.53     94.64

这是我要查找的摘要的最后一行。

0 个答案:

没有答案