monte_carlo: Function to use Monte Carlo strategy

Description Usage Arguments Value Examples

View source: R/Monte_Carlo.R

Description

Function to use Monte Carlo strategy

Usage

1
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

1
2
3
4
5
6
7
8
9
## 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)

ForecastTB documentation built on March 14, 2020, 5:07 p.m.