Name
aggreg1 — Generates a temporal aggregation matrix
CALLING SEQUENCE
[C]=aggreg1(N,s,opt)
PARAMETERS
- Input
N = number of low frequency data
s = frequency conversion
opt = type of temporal aggregation:
- opt = -1 ---> sum (flow)
- opt = 0 ---> average (index)
- opt = k ---> k-th element (k>=1 and k<=s)
- Output
C = (N x sN) temporal aggregation matrix
DESCRIPTION
Generates a temporal aggregation matrix: applied to a high frequency series, the function will generate the corresponding low frequency series, by averaging, adding or extrapolating the high frequency values.
EXAMPLE
X=aggreg1(x,4,0)
Aggregates the series x from quarterly to annual (conversion from frequency 4 to 1) by taking the mean of the quarterly
data.