cvfitplot | R Documentation |
Plot summarised error of different curves specification from cvfit
.
Assuming normal errors, plot the mean cross-validated error and the 95
cvfitplot(cvKeep, xlock = c("mean", "median"), cvRF = NULL, cvSP = NULL)
cvKeep |
The output of |
xlock |
Focus horizontal axis on |
cvRF |
Include cross-validation results from random forecast non-parametric curves. Obtain these from |
cvSP |
Include cross-validation results from spline regression non-parametric curves. Obtain these from |
No returned value. Produces a summary plot of cross-validated errors.
Nikolaos Kourentzes, nikolaos@kourentzes.com
Chen, Z., Kourentzes, N., & Veyrune, R. (2023). Modeling the Reserve Demand to Facilitate Central Bank Operations. IMF Working Papers, 2023(179).
cvfit
.
# Use ECB example data
rate <- ecb$rate
x <- ecb$x[,1:3,drop=FALSE]
cvKeep <- cvfit(x,rate,folds=5,alltype=c("logistic","arctan"),parallel=TRUE)
cvfitplot(cvKeep)
# Add results from non-parameteric curves
cvRF <- cvnpcurve(x,rate,cvKeep$cvIndex)
cvSP <- cvnpcurve(x,rate,cvKeep$cvIndex,type="spline")
cvfitplot(cvKeep,cvRF=cvRF,cvSP=cvSP)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.