Arrange temporal and cross-temporal residuals in a matrix form

residuals_matrix(res, m)

Arguments

res

(\(n \times N(k^\ast + m)\)) matrix or (\(N(k^\ast + m)\)) vector containing the residuals at all the temporal frequencies ordered [lowest_freq' ... highest_freq']'.

m

Highest available sampling frequency per seasonal cycle (max. order of temporal aggregation, \(m\)), or a subset of \(p\) factors of \(m\).

Value

a (\(N \times n(k^\ast + m)\)) matrix (if the input res is a vector then \(n = 1\))

See also

Examples

data(FoReco_data)
mat <- residuals_matrix(FoReco_data$res, m = 12)