tsForecastDaily: Daily Time Series Forecast

Description Usage Arguments Value

Description

Uses recursive partitioning and auto arima to make daily forecasts.

Requires the data to already be summarized into daily amounts. Make sure that there are no missing periods of coviate data if covariates are being included in the model.

Usage

1
2
3
tsForecastDaily(df, dateColumn, valueColumn, covs = NULL, algo = "rpart",
  lossFunction = "mape", period = 28, seasonalPeriods = c(7, 364),
  K = 2, returnMePlot = F, returnYoyPlot = F)

Arguments

df

The unquoted name of the dataframe that you want to summarize.

dateColumn

The quoted name of the column that contains the daily dates.

valueColumn

The quoted name of the column that has the daily values to be forecasted.

covs

Optional. A dataframe of covariates. This dataframe should include at least two columns: (1) A date column with the number of rows equal to the number of periods to forecast into the future, and (2) a column with values for each day.

algo

Quoted name of algorithm to use. Defaults to rpart, which is fast. The other option is randomForest.

lossFunction

Defaults to "mape" (mean absolute percentage error). Other option is "mae" (mean absolute error).

period

The number of periods forecasted into the future.

seasonalPeriods

The other periods, in addition to the period parameter, that may be influential

K

The number of fourier terms. Must be one lesss than the number of periods

returnMePlot

Return the model evaluation plot?

returnYoyPlot

Return the year-over-year plot?

Value

List the contains a dataframe with the test, training, and forecasted data (dataFor), a dataframe with only the forecasted data (dataForOnly), variable importance plot if randomForest is selected (viPlot), loss (either mape or mae), model evaluation plot (modelEvalPlot), and year over year dataframe including the forecast (yoySales).


RonGuymon/ronsFunctions documentation built on May 8, 2019, 11:42 a.m.