apaTemporal.Window.TimeIdx.First(Data, nInSample, nOutOfSample, nSteps, nShifts, IsCumulativeInSample, IsCumulativeOutOfSample, WindowIndex, IsInSampleOtherwiseOutOfSample)
=apaTemporal.Window.TimeIdx.First(Data, nInSample, nOutOfSample, nSteps, nShifts, IsCumulativeInSample, IsCumulativeOutOfSample, WindowIndex, IsInSampleOtherwiseOutOfSample)Result
Returns the first time index (row number) of a particular rolling window, either of the in-sample or of the out-of-sample window.
Syntax
Data: rows x cols matrix of data
nInSample: number of obs in the in-sample window
nOutOfSample: number of obs in the out-of-sample window
nSteps: number of steps to move the windows
nShifts: number of +/- shifts of the beginning of the out-of-sample window
IsCumulativeInSample: TRUE to always start the in-sample data set at the first observation, i.e. to accumulate observations
IsCumulativeOutOfSample: TRUE to always start the out-of-sample data set at the first observation
WindowIndex: index of the dataset. Ranges from 1 to the maximum number of datasets possible.
IsInSampleOtherwiseOutOfSample: optional; TRUE to return the in-sample time index, FALSE to return the out-of-sample time index; default: TRUE
Algorithm
The windows are defined as in apaTemporal.Window.Data. The first time index of the window with the given WindowIndex is returned.
Remarks
nShifts can be negative.
