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 cvfit.

xlock

Focus horizontal axis on mean or median, The latter provides a narrower range, facilitating comparison when there are outliers.

cvRF

Include cross-validation results from random forecast non-parametric curves. Obtain these from cvnpcurve with type="rforest". Use NULL to ignore.

cvSP

Include cross-validation results from spline regression non-parametric curves. Obtain these from cvnpcurve with type="spline". Use NULL to ignore.

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

cvfit.

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)



[Package curvir version 0.1.1 Index]