create_ungrouped_main_forecasting_table: Create ungrouped main forecasting table

Description Usage Arguments Value Examples

View source: R/ANTE_FORECAST_create_ungrouped_main_forecasting_table.R

Description

create_ungrouped_main_forecasting_table is a function to create a table in which every row represents a different split of the data for time series forecasting. Every row contains an overview of parameters used for splitting the data into time series objects for training and validation, as well as the training and validation time series objects themselves.

Usage

1
2
3
4
5
6
create_ungrouped_main_forecasting_table(
  data,
  seasonal_periods = c(12, 3),
  min_train_periods = 32,
  max_train_periods = Inf
)

Arguments

data

A tibble containing the data to be used for time series forecasting, which has been created using the initialize_ts_forecast_data function from tstools.

seasonal_periods

A vector of positive integer values indicating the number of data points that together compose a season (e.g. c(12,3) for quarterly and yearly seasonality when using monthly data).

min_train_periods

A positive integer value indicating the minimum number of periods of data required for the training time series objects.

max_train_periods

A positive integer value indicating the maximum number of periods of data to be used for the training time series objects.

Value

A tibble containing several columns of data required for time series forecasting.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data <- tstools::initialize_ts_forecast_data(
      data = dummy_gasprice,
      date_col = "year_month",
      col_of_interest = "gasprice",
      group_cols = c("state", "oil_company"),
      xreg_cols = c("spotprice", "gemprice")
   ) %>%
   dplyr::filter(grouping == "state = New York   &   oil_company = CompanyA")
create_ungrouped_main_forecasting_table(
   data = data,
   seasonal_periods = c(12, 3),
   min_train_periods = 25,
   max_train_periods = Inf
)

ing-bank/tsforecast documentation built on Sept. 18, 2020, 9:40 a.m.