make_mcmatrix {mcompanion} | R Documentation |
Generate a multi-companion matrix from spectral description
Description
Generate a multi-companion matrix or its Jordan decomposition from spectral parameters.
Usage
make_mcmatrix(type = "real", what.res = "matrix", ..., eigval0)
make_mcchains(eigval, co, dim, len.block, eigval0 = FALSE,
mo.col = NULL, what.co = "bottom", ...)
Arguments
eigval |
the eigenvalues, a numeric vector |
co |
the seeding parameters for the eigenvectors, a matrix |
dim |
the dimension of the matrix, a positive integer |
len.block |
lengths of Jordan chains,
|
type |
mode of the matrix, real or complex |
what.res |
format of the result, see details |
eigval0 |
If TRUE completes the matrix to a square matrix, see
details. |
... |
for |
mo.col |
the last non-zero column in the top of the mc-matrix. The default is
|
what.co |
a character string equal to |
Details
make_mcmatrix
creates a multi-companion matrix specified by
spectral parameters. make_mcchains
creates a matrix of
eigenvectors and generalised eigenvectors from the given spectral
parameters.
make_mcmatrix
passes the spectral parameters to
make_mcchains
to generate the (generalised) eigenvectors. It
then calls Jordan_matrix
to create the corresponding Jordan
matrix. The results are combined to produce the multicompanion
matrix. By default, the real part is returned, which is appropriate
if all complex spectral parameters come in complex conjugate
pairs. This may be changed by argument type
. A list containing
the matrix and the Jordan factors is returned if what.res =
"list"
.
The closely related function sim_mc
is like
make_mcmatrix
but it does not need complete specification of
the matrix - it completes
any missing information (eigenvalues, co) with randomly generated
entries. The result of both functions is a list or ordinary matrix,
use mCompanion
to obtain a MultiCompanion
object
directly.
make_mcchains
constructs the eigensystem, make_mcmatrix
calls make_mcchains
(passing the ...
arguments to it)
and forms the matrix. make_mcchains
passes the ...
arguments to mc_0chains
.
make_mcchains
creates the full eigenvectors from the co
parameters. If the number of vectors is smaller then dim
and
eigval0
is TRUE it then completes the system with chains for
the zero eigenvalue. More specifically, it assumes that the number of
the given chains is mo.col
, takes chains corresponding
to the zero eigenvalue, if any, and adds additional eigenvectors
and/or generalised eigenvectors to construct the complete system.
The mc-order is determined from the dimension of the 'co'
parameters. If that is equal to dim
, the mc-matrix is actually a
general matrix.
TODO: cover the case mo < mo.col
?
Value
make_mcmatrix
normally returns the multi-companion matrix (as an
ordinary matrix) having the given spectral properties but if
what.res = "list"
, it returns a list containing the matrix and
the spectral information:
eigval |
eigenvalues, a vector |
len.block |
lengths of Jordan chains, a vector |
mo |
multi-companion order, positive integer |
eigvec |
generalied eigenvectors, a matrix |
co |
seeding parameters |
mo.col |
top order |
mat |
the multi-companion matrix, a matrix |
make_mcchains
returns a similar list without the component
mat
.
Note
The result is an ordinary matrix. Also, some entries that should be 0 may be non-zero due to numerical error.
To get a MultiCompanion object use mCompanion
.
Author(s)
Georgi N. Boshnakov
References
Boshnakov GN (2002). “Multi-companion matrices.” Linear Algebra Appl., 354, 53–83. ISSN 0024-3795, doi:10.1016/S0024-3795(01)00475-X.
Boshnakov GN, Iqelan BM (2009). “Generation of time series models with given spectral properties.” J. Time Series Anal., 30(3), 349–368. ISSN 0143-9782, doi:10.1111/j.1467-9892.2009.00617.x.
See Also
make_mcev
,
make_mcgev
,
sim_mc
,
mCompanion
Examples
make_mcmatrix(eigval = c(1, 0.5), co = cbind(c(1,1), c(1, -1)), dim = 4,
mo.col = 2,
len.block = c(1, 1))
## one unit root, one root = 0.5
make_mcmatrix(eigval = c(1, 0.5), co = cbind(c(1,1), c(1, -1)), dim = 6,
mo.col = 2,
len.block = c(1, 1))
## two simple unit roots, one root = 0.5
make_mcmatrix(eigval = c(1, 1, 0.5), co = cbind(c(1,1), c(1, -1), c(1, 1)), dim = 6,
mo.col = 3,
len.block = c(1, 1, 1))
## two unit roots with a single Jordan chain, one root = 0.5
make_mcmatrix(eigval = c(1, 0.5), co = cbind(c(1,1), c(0, 1), c(1, 1)), dim = 6,
len.block = c(2, 1))
## make_mcchains
make_mcchains(c(1, 0.5), co = cbind(c(1,1), c(1, 1)), dim = 4,
len.block = c(1, 1), eigval0 = TRUE)
## one unit root, one root = 0.5
make_mcchains(c(1, 0.5), co = cbind(c(1,1), c(1, 1)), dim = 6,
len.block = c(1, 1), eigval0 = TRUE)
## two simple unit roots, one root = 0.5
make_mcchains(c(1, 1, 0.5), co = cbind(c(1,1), c(1, -1), c(1, 1)), dim = 6,
len.block = c(1, 1, 1), eigval0 = TRUE)
## two unit roots with a single Jordan chain, one root = 0.5
make_mcchains(c(1, 0.5), co = cbind(c(1,1), c(1, -1), c(1, 1)), dim = 6,
len.block = c(2, 1), eigval0 = TRUE)
## examples with mc-order = dim
make_mcchains(c(1), co = cbind(c(1,1,1,1), c(1,2,1,1)), dim = 4,
len.block = c(2), eigval0 = TRUE)
## do not complete with chians for the 0 eigval:
make_mcchains(c(1), co = cbind(c(1,1,1,1), c(1,2,1,1)), dim = 4,
len.block = c(2), eigval0 = FALSE)
make_mcmatrix(eigval = c(1), co = cbind(c(1,1,1,1), c(1,2,1,1)), dim = 4,
len.block = c(2))
make_mcmatrix(eigval = c(1), co = cbind(c(1,1,1,1), c(1,2,3,4)), dim = 4,
len.block = c(2))