Generate periodic filters
sim_pcfilter.RdGenerates periodic filters.
Details
Generates periodic filters using the multicompanion approach (Boshnakov and Iqelan 2009) .
By default the generated filter is stable and may be used as the
  autoregressive or moving average part of a periodic autoregressive
  moving average model. The filter is generated from the specified
  spectral information by factoring a multi-companion matrix. Any
  non-specified quantities are generated randomly. Randomly generated
  eigenvalues correspond to stable filter. The user may specify
  non-stable roots, unit roots in particular, see sim_mc.
Value
A list as obtained from sim_mc with an addtional
  component for the filter.
- pcfilter
- a matrix with the filter coefficients for the i-th season in the i-th row. 
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 .
Note
todo: a) Allow different orders for the individual seasons. This is not trivial and maybe not natural for this method. In the singular case it may make sense to implement different strategies for choosing the factorization (when it is not unique) and to choose more carefully the order of the filter to ensure existence of factorization, see my paper.
Examples
rfi <- sim_pcfilter(2,3)
rfi
#> $eigval
#> [1] -0.5468048+0.0000000i -0.1820397-0.3430409i -0.1820397+0.3430409i
#> 
#> $len.block
#> [1] 1 1 1
#> 
#> $mo
#> [1] 2
#> 
#> $eigvec
#>               [,1]                   [,2]                   [,3]
#> [1,]  0.3692072+0i  0.1318930+0.07213154i  0.1318930-0.07213154i
#> [2,]  0.6907258+0i -0.4406844+0.86258673i -0.4406844-0.86258673i
#> [3,] -0.6752085+0i -0.3232681+0.21293495i -0.3232681-0.21293495i
#> 
#> $co
#>               [,1]                  [,2]                  [,3]
#> [1,]  0.6907258+0i -0.4406844+0.8625867i -0.4406844-0.8625867i
#> [2,] -0.6752085+0i -0.3232681+0.2129349i -0.3232681-0.2129349i
#> 
#> $mo.col
#> [1] 3
#> 
#> $mat
#>          [,1]          [,2]          [,3]
#> [1,] 0.114261 -1.329005e-01  2.255191e-01
#> [2,] 5.211034 -1.025145e+00  2.360085e+00
#> [3,] 1.000000  5.244760e-17 -1.107306e-16
#> 
#> $pcfilter
#>            [,1]       [,2]        [,3]
#> [1,] 5.21103393 -1.0251453  2.36008471
#> [2,] 0.09555553 -0.3836821 -0.03494224
#> 
mo <- cbind(c(1,1),rfi$pcfilter)
mo
#>      [,1]       [,2]       [,3]        [,4]
#> [1,]    1 5.21103393 -1.0251453  2.36008471
#> [2,]    1 0.09555553 -0.3836821 -0.03494224