cvfitplot {curvir} | R Documentation |
Plot output of cvfit to facilitate comparison
Description
Plot summarised error of different curves specification from cvfit
.
Assuming normal errors, plot the mean cross-validated error and the 95
Usage
cvfitplot(cvKeep, xlock = c("mean", "median"), cvRF = NULL, cvSP = NULL)
Arguments
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 |
Value
No returned value. Produces a summary plot of cross-validated errors.
Author(s)
Nikolaos Kourentzes, nikolaos@kourentzes.com
References
Chen, Z., Kourentzes, N., & Veyrune, R. (2023). Modeling the Reserve Demand to Facilitate Central Bank Operations. IMF Working Papers, 2023(179).
See Also
Examples
# 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)