data_prep_single_ts: A function to prepare a single time series for forecasting...

Description Usage Arguments

View source: R/data_prep_one_ts.R

Description

data_prep_single_ts() is function that allows you to create machine ready data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data_prep_single_ts(
  data,
  dep_var,
  date_group = "day",
  clean_outliers = TRUE,
  drop_na = TRUE,
  prepros = "log",
  spline_degree = 3,
  fourier_k = 5,
  horizon = 30,
  use_xreg = FALSE,
  zero_out_fridagar = today() + years(1),
  fridagar = FALSE
)

Arguments

data

A data frame that contains only two variables, date and the outcome

dep_var

Unquoted name of the dependent variable

date_group

Frequency of the data, defaults to day

drop_na

When creating data_prepared_tbl, should NA's be dropped. Defaults to TRUE

prepros

The preprocessing of the outcome variable. Defaults to log

spline_degree

The degree of the natural spline, defaults to 3

fourier_k

Number or orders to include for each sine/cosine

use_xreg

Are you using external regressors, defaults to FALSE

zero_out_fridagar

Should holidays be set to zero for the forecast horizon due to e.g. covid, defaults to 1 year into the future

fridagar

Do you want to use holidays, defaults to FALSE

horzon

The forecasting horizon, defaults to 30


vidarsumo/sumots documentation built on June 29, 2021, 4:23 a.m.