mc_from_factors: Multi-companion matrix from factors

View source: R/mc.R

mc_from_factorsR Documentation

Multi-companion matrix from factors

Description

Compute a multi-companion matrix from its companion factors or from a periodic filter. Create the multi-companion matrix corresponding to a periodic filter by multiplying the relevant companion matrices in reverse order.

Usage

mc_from_factors(x)
mc_from_filter(x)

Arguments

x

a matrix with a row for each companion factor, see details.

Details

x is a matrix whose i-th row is the top row of the i-th companion factor (for mc_from_factors) or the filter coefficients for the i-th season (for mc_from_filter).

mc_from_factors is, effectively, the inverse of mc_factorize. The companion matrices specified by the argument are multiplied.

mc_from_filter is similar except that the relevant companion matrices are multiplied in reverse order. After all, it is natural to have the coefficients for the i-th season in the i-th row!

todo: add an argument to specify the "first" season.

Value

The top of the resulting multi-companion matrix.

Level

Currently mc_from_factors calls mCompanion, which it probably should not do.

Author(s)

Georgi N. Boshnakov

References

\insertRef

boshnakov2002mcmcompanion

See Also

mc_factorize

Examples

x <- matrix(1:8, nrow = 2)
mc_from_factors(x)
mCompanion(mc_from_factors(x))

mc_from_filter(x)
mCompanion(mc_from_filter(x))

mcompanion documentation built on Sept. 22, 2023, 5:12 p.m.