apaTemporal.Aggregation.Matrix(nLoFreqPeriods, nHiFreqPeriods, nHiFreqPeriodsPerLoFreqPeriod, StartIndex)
=apaTemporal.Aggregation.Matrix(nLoFreqPeriods, nHiFreqPeriods, nHiFreqPeriodsPerLoFreqPeriod, StartIndex)Result
Generates a temporal aggregation matrix of size nLoFreqPeriods x nHiFreqPeriods. Multiplying this matrix with a high frequency data vector results in the additively aggregated low frequency data.
Syntax
nLoFreqPeriods: number of low frequency periods
nHiFreqPeriods: number of high frequency periods
nHiFreqPeriodsPerLoFreqPeriod: number of high frequency periods in one low frequency period, e.g. 3 for monthly data within quarterly periods
StartIndex: optional; index of the starting point on the high frequency scale; default: 1
Algorithm
The aggregation matrix is the Kronecker product of an nLoFreqPeriods x nLoFreqPeriods identity matrix and a 1 x nHiFreqPeriodsPerLoFreqPeriod vector of ones.
Remarks
StartIndex must not be larger than nHiFreqPeriodsPerLoFreqPeriod.
