Learn R Programming

BGVAR (version 2.1.0)

rmse.bgvar.predict: Compute root mean squared errors

Description

Computes and prints root mean squared errors (RMSEs) of an object of class bgvar.predict.

Usage

rmse(object, ...)

Arguments

object

an object of class bgvar.predict.

...

additional arguments.

Value

Returns an object of class bgvar.rmse, which is a matrix of dimension h times K, whereas h is the forecasting horizon and K is the number of variables in the system.

Examples

Run this code
# NOT RUN {
library(BGVAR)
data(eerData)
model.ssvs.eer<-bgvar(Data=eerData,W=W.trade0012,draws=100,burnin=100,plag=1,prior="SSVS",
                      eigen=TRUE,h=8)
fcast <- predict(model.ssvs.eer,n.ahead=8,save.store=TRUE)
rmse   <- rmse(fcast)
# }

Run the code above in your browser using DataLab