predict.curvir {curvir}R Documentation

Predict method for curvir reserve demand models

Description

Predicted values based on curvir model object

Predicted values based on npcurvir model object

Usage

## S3 method for class 'curvir'
predict(object, newdata = NULL, newdummy = NULL, ...)

## S3 method for class 'npcurvir'
predict(object, newdata = NULL, newdummy = NULL, ...)

Arguments

object

A model fit with npcurve.

newdata

New input data organised as the x matrix in curve. If NULL then the data used to fit the model is re-used.

newdummy

New input dummy organised as the dummy vector in curve. If NULL then the dummy used to fit the model is re-used.

...

Further arguments (unused)

Value

Returns a matrix of predicted values. If the model has estimates for intervals then it will provide upper and lower intervals.

Returns a matrix of predicted values. If the model has estimates for intervals then it will provide upper and lower intervals.

Methods (by class)

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

curve.

npcurve.

Examples



  # Use ECB example data
  rate <- ecb$rate
  x <- ecb$x[,1,drop=FALSE]
  fit <- curve(x,rate)
  predict(fit)

  # An example with new data
  predict(fit,newdata=tail(x))
 

# Use ECB example data
rate <- ecb$rate
x <- ecb$x[,1,drop=FALSE]
fit <- npcurve(x,rate)
predict(fit)


[Package curvir version 0.1.1 Index]