Description Usage Arguments Details Value Author(s) References See Also Examples

Generate plot showing optimal number of components for Repeated Double Cross-Validation

1 | ```
plotcompmvr(mvrdcvobj, ...)
``` |

`mvrdcvobj` |
object from repeated double-CV, see |

`...` |
additional plot arguments |

After running repeated double-CV, this plot helps to decide on the final number of components.

`optcomp` |
optimal number of components |

`compdistrib` |
frequencies for the optimal number of components |

Peter Filzmoser <P.Filzmoser@tuwien.ac.at>

K. Varmuza and P. Filzmoser: Introduction to Multivariate Statistical Analysis in Chemometrics. CRC Press, Boca Raton, FL, 2009.

1 2 3 4 5 6 | ```
data(NIR)
X <- NIR$xNIR[1:30,] # first 30 observations - for illustration
y <- NIR$yGlcEtOH[1:30,1] # only variable Glucose
NIR.Glc <- data.frame(X=X, y=y)
res <- mvr_dcv(y~.,data=NIR.Glc,ncomp=10,method="simpls",repl=10)
plot2 <- plotcompmvr(res)
``` |

```
Loading required package: rpart
[1] 1
[1] 2
[1] 3
[1] 4
[1] 5
[1] 6
[1] 7
[1] 8
[1] 9
[1] 10
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.