Description Usage Arguments Examples
View source: R/PlotAdaptiveReg.R
This function produces a plot of the R^2 estimated by cross-validation as a function of the number of eigenvectors included in the fitting. The vertical red lines indicated the optimal R^2 and the corresponding number of eigenvectors.
1 | PlotAdaptiveReg(fit)
|
fit |
An object containing a fitted model obtained by the |
1 2 3 4 5 6 | library(prospectr)
data(NIRsoil)
indNA = which(is.na(NIRsoil$Nt))
NIRNt = list(x=NIRsoil$spc[-indNA,],y=NIRsoil$Nt[-indNA])
fit = AdaptiveReg(NIRNt$x,NIRNt$y,nvmax=100)
PlotAdaptiveReg(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.