predict.curvir | R Documentation |
Predicted values based on curvir model object
Predicted values based on npcurvir model object
## S3 method for class 'curvir'
predict(object, newdata = NULL, newdummy = NULL, ...)
## S3 method for class 'npcurvir'
predict(object, newdata = NULL, newdummy = NULL, ...)
object |
A model fit with |
newdata |
New input data organised as the x matrix in |
newdummy |
New input dummy organised as the dummy vector in |
... |
Further arguments (unused) |
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.
predict(curvir)
: Predicted values for parametric curves
predict(npcurvir)
: Predicted values for non-parametric curves
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).
curve
.
npcurve
.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.