out_of_sample.mtar: Computing Out-of-Sample predictive accuracy measures

View source: R/forecasting.R

out_of_sample.mtarR Documentation

Computing Out-of-Sample predictive accuracy measures

Description

Computes Out-of-Sample predictive accuracy measures for two or more objects of class mtar.

Usage

## S3 method for class 'mtar'
out_of_sample(
  ...,
  newdata,
  n.ahead = NULL,
  credible = 0.95,
  FUN = mean,
  rolling = NULL
)

Arguments

...

one or more objects of class mtar.

newdata

A data.frame containing future values of the threshold series (if included in the fitted model), the exogenous series (if included in the fitted model), and the realized values of the output series.

n.ahead

A positive integer specifying the number of steps ahead to forecast.

credible

An optional numeric value in (0,1) specifying the level of the required prediction intervals. By default, credible is set to 0.95.

FUN

An optional function used to summarize the n.ahead values computed for each predictive accuracy measure. By default, FUN is set to mean.

rolling

An optional positive integer specifying the rolling-window size used for forecasting. By default, rolling = NULL, indicating that rolling-window forecasting is not performed.


mtarm documentation built on June 12, 2026, 5:07 p.m.