Skip to contents

Creates a block companion matrix from a list of coefficient matrices.

Usage

CompanionMat(x)

Arguments

x

A list of numeric coefficient matrices.

Value

A block companion matrix.

Details

Let x be a list of coefficient matrices \(\{\Beta_1, \Beta_2, \ldots, \Beta_p\}\), where each \(\Beta_j\) is a \(q \times q\) matrix. This function returns the \(pq \times pq\) block companion matrix whose first block row contains the coefficient matrices and whose lower block subdiagonal contains identity matrices.

Author

Ivan Jacob Agaloos Pesigan

Examples

beta <- list(
  matrix(
    data = c(
      0.40, 0.10,
      0.20, 0.30
    ),
    nrow = 2,
    ncol = 2
  ),
  matrix(
    data = c(
      0.10, 0.00,
      0.05, 0.10
    ),
    nrow = 2,
    ncol = 2
  )
)

CompanionMat(x = beta)
#>      [,1] [,2] [,3] [,4]
#> [1,]  0.4  0.2  0.1 0.05
#> [2,]  0.1  0.3  0.0 0.10
#> [3,]  1.0  0.0  0.0 0.00
#> [4,]  0.0  1.0  0.0 0.00