AlignTS2ForecastHorizonAndOrigin: Align Time Series to Forecast Horizon And Origin

View source: R/AlignTS2ForecastHorizonAndOrigin.R

AlignTS2ForecastHorizonAndOriginR Documentation

Align Time Series to Forecast Horizon And Origin

Description

Extends or shortens time series w.r.t to Forecasting

Usage

AlignTS2ForecastHorizonAndOrigin(Time, Resolution = "weeks", Origin, Horizon, DataVector)

Arguments

Time

[1:n] vector of time relevant for seq, usually an as.Date object

Resolution

"weeks", "months", "days" or others accepted strings by seq or "FiskalWeekStartOfMonth"

Origin

Forecastorigin as indexed w.r.t to Time; Origin=0 means that from the given Time a "future" is generated

Horizon

Positive number, Forecasthorizon as number of steps to be forecasted

DataVector

Optional, [1:n] vector of data ordered the same way as time

Details

Assumes regular time series with ordered time steps.

Origin=0 means that a new timestamps in the "future" are generated starting from max(Time)+1

FiskalWeekStartOfMonth: Means that in a weekly 5,4,4 pattern timestamps of months are generating mapping each start of month to the first fiskal week in that month. It assumes that this pattern is already given in Time and that each week starts on monday with the first week of the year starting on the first monday of that year. Hence, Forecasthorizon is chosen in months.

Value

LIST of

Time

with[1:(Origin+Horizon)]

DataVector

with [1:(Origin+Horizon)]

Author(s)

Michael Thrun

See Also

seq

Examples

#todo

Mthrun/TSAT documentation built on Feb. 5, 2024, 11:15 p.m.