I would like to export the summary of a plsr
model (pls
package) to a nice table (preferably HTML). I am aware of nice methods for lm
models, but I am curious if someone out there knew of a quick way to extract the information from plsr
and format it to a nice table. I personally struggle finding the same information displayed by summary(my.plsr.model)
when I use str()
.
Here is an example of the summary output
Data: X dimension: 405 239
Y dimension: 405 1
Fit method: kernelpls
Number of components considered: 20
VALIDATION: RMSEP
Cross-validated using 405 leave-one-out segments.
(Intercept) 1 comps 2 comps 3 comps 4 comps 5 comps 6 comps 7 comps 8 comps 9 comps 10 comps
CV 1.587 1.465 1.394 1.372 1.336 1.296 1.282 1.225 1.211 1.193 1.173
adjCV 1.587 1.465 1.394 1.372 1.336 1.296 1.282 1.225 1.211 1.193 1.173
11 comps 12 comps 13 comps 14 comps 15 comps 16 comps 17 comps 18 comps 19 comps 20 comps
CV 1.175 1.159 1.174 1.184 1.187 1.173 1.158 1.108 1.115 1.063
adjCV 1.175 1.160 1.175 1.184 1.186 1.173 1.157 1.107 1.114 1.061
TRAINING: % variance explained
1 comps 2 comps 3 comps 4 comps 5 comps 6 comps 7 comps 8 comps 9 comps 10 comps 11 comps
X 62.23 67.88 83.52 87.71 89.28 92.02 92.71 93.67 94.66 95.36 95.82
Yvar 15.33 26.44 29.10 34.29 40.35 42.50 49.62 52.69 54.16 55.06 56.10
12 comps 13 comps 14 comps 15 comps 16 comps 17 comps 18 comps 19 comps 20 comps
X 96.68 97.30 97.63 98.02 98.24 98.36 98.49 98.6 98.73
Yvar 56.94 58.51 61.31 63.07 64.64 66.31 67.71 69.1 70.08