test.R

library(tseries)
library(forecast)
library(lmtest)
# devtools::install_github("faganok/scenario")
# library(scenario)
source("R/lagged.R")
source("R/models.R")
source("R/na_extrap.R")
source("R/set_lag.R")
source("R/set_d.R")
source("R/model_stat.R")
source("R/accur.R")
source("R/forecast_consensus.R")
source("R/forecast_report.R")
source("R/forecast_tables.R")

my_data <- data.frame(
    y  = c(55, 57, 60, 69, NA, NA, 77, 83, 90, 90, NA, NA),
    X1 = c(50, 43, 48, 49, 41, 38, 36, 25, 22, 20, 19, 17),
    X2 = c(88, 86, 87, 90, 98, 75, 76, 65, 55, 45, 30, 31),
    X3 = c(60, 71, 75, 78, NA, 80, 83, 87, 89, 90, NA, 98)
)

my_data <- c(55, 57, 60, 69, NA, NA, 77, 83, 90, 90, NA, NA)

data = my_data
date_y = c(1, 9)
n_ahead = 3
variant = 1
nnar_model = TRUE
auto_ic = TRUE
accuracy_crit = c("RMSE")
diff_test = c("KPSS")
output = "best"
write_report = TRUE
dir = 'Output'
verbose = TRUE


scenario(
    data = my_data,
    date_y = c(1, 9),
    n_ahead = 3,
    variant = 1,
    nnar_model = TRUE,
    auto_ic = TRUE,
    accuracy_crit = c("RMSE"),
    diff_test = c("KPSS"),
    output = "best",
    write_report = FALSE,
    dir = 'Output',
    verbose = TRUE
)
faganok/scenario documentation built on Nov. 28, 2017, 4:06 p.m.