Description Author(s) See Also Examples
This package provides functions to construct prediction rules using an adaptive handling of dependence.
Florian Hébert, Mathieu Emily, David Causeur
Maintainer: Florian Hébert <florian.hebert@agrocampus-ouest.fr>
AdaptiveReg
PredictAdaptiveReg
PlotAdaptiveReg
1 2 3 4 5 6 7 8 9 10 11 | library(prospectr)
data(NIRsoil)
indNA = which(is.na(NIRsoil$Nt))
NIRNt = list(x=NIRsoil$spc[-indNA,],y=NIRsoil$Nt[-indNA]) #remove NA
NIRNt = list(x=NIRNt$x[-c(287,316,321,486,641,643),],
y=NIRNt$y[-c(287,316,321,486,641,643)]) #remove outliers
ind.test = sample(1:length(NIRNt$y),50)
fit = AdaptiveReg(NIRNt$x[-ind.test,],NIRNt$y[-ind.test],nvmax=100)
PlotAdaptiveReg(fit)
pred = PredictAdaptiveReg(fit,NIRNt$x[ind.test,])
plot(NIRNt$y[ind.test],pred,pch=16,xlab="Y",ylab=expression(hat(Y)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.