monte_carlo {ForecastTB}R Documentation

Function to use Monte Carlo strategy

Description

Function to use Monte Carlo strategy

Usage

monte_carlo(object, size, iteration, fval = 0, figs = 0)

Arguments

object

as output of 'prediction_errors()' function

size

as volume of time series used in Monte Carlo strategy

iteration

as number of iterations models to be applied

fval

as a flag to view forecasted values in each iteration (default: 0, don't view values)

figs

as a flag to view plots for each iteration (default: 0, don't view plots)

Value

Error values with provided models in each iteration along with the mean values

Examples

## Not run: 
library(forecast)
test3 <- function(data, nval){return(as.numeric(forecast(ets(data), h = nval)$mean))}
a <- prediction_errors(data = nottem,
    Method = c("test3(data, nval)"),
    MethodName = c("ETS"), append_ = 1)
monte_carlo(object = a1, size = 144, iteration = 10)

## End(Not run)

[Package ForecastTB version 1.0.1 Index]