invcurve {curvir}R Documentation

Calculate the inverse curve prediction

Description

Calculate the predicted reserves given some rate, i.e., calculate the prediction of the inverse curve.

Usage

invcurve(
  object,
  ynew = NULL,
  xnew = NULL,
  dummynew = NULL,
  warn = c(TRUE, FALSE)
)

Arguments

object

A model fit with curve.

ynew

The input rate. If NULL this corresponds to the values from predict(object).

xnew

The values for the additional regressors that were used in the curve fit. Must be a matrix, ordered (columns) as they were input in the fitting of the curve. The constant is dealt with automatically. Do not input the excess reserves. If NULL this is picked up from the data used to fit the curve.

dummynew

The values for the indicator, if one was used in the fitting of the curve. If NULL then the data used in the fitting of the model are used.

warn

A logical (TRUE or FALSE) to issue a warning if the resulting values are more than 10% away from the min-max of the excess reserves used to estimate the curve.

Value

Returns a vector of values of the predicted reserves

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, and predict.

Examples



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

  # Use a different input rate
  invcurve(fit,ynew=0.1)



[Package curvir version 0.1.1 Index]