intervals {evreg} | R Documentation |
Computation of prediction intervals from a trained ENNreg model
Description
intervals
computes probabilistic and belief prediction intervals from a prediction object
returned by function predict.ENNreg
.
Usage
intervals(pred, level = 0.9, yt = NULL)
Arguments
pred |
Prediction object returned by function |
level |
Level of the prediction interval (between 0 and 1). |
yt |
Optional vector of test response values. |
Value
A list with four elements:
- INTP
Matrix (n,2) of probabilistic prediction intervals.
- INTBel
Matrix (n,2) of belief prediction intervals.
- coverage.P
Estimated coverage rate of the probabilistic intervals (if yt is provided).
- coverage.Bel
Estimated coverage rate of the belief intervals (if yt is provided).
- Pl.Bel
Mean plausibility of the belief intervals.
See Also
Examples
library(MASS)
X<-as.matrix(scale(Boston[,1:13]))
y<-Boston[,14]
set.seed(220322)
n<-nrow(Boston)
ntrain<-round(0.7*n)
train <-sample(n,ntrain)
fit <- ENNreg(X[train,],y[train],K=30)
pred<-predict(fit,newdata=X[-train,],yt=y[-train])
int<- intervals(pred,level=0.95,y[-train])
print(c(int$coverage.P,int$coverage.Bel))
[Package evreg version 1.1.1 Index]