Skip to contents

Generate a periodic autoregression model, possibly integrated.

Usage

sim_parCoef(period, n.root, sigma2 = rep(1, period), ...)

Arguments

period

number of seasons in a cycle.

n.root

number of non-zero roots, see details.

sigma2

variances of the innovations.

...

additional arguments to be passed down to sim_pcfilter

Details

sim_parCoef uses the multi-companion method to generate the model. The function is essentially a wrapper for sim_pcfilter.

The order of the filter is set to n.root for each season. Part of the spectral information may be specified with the "..." arguments, see sim_pcfilter and sim_mc for a discussion of this.

Value

a periodic autoregression model as a list with elements:

ar

a matrix whose \(i\)th row contains the coefficients for the \(i\)season,

sigma2

the innovation variances, a numeric vector.

References

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 .

Author

Georgi N. Boshnakov

See also

sim_pcfilter

Examples

sim_parCoef(2, 4)                    # 2 seasons
#> $ar
#>      [,1]        [,2]       [,3]          [,4]        [,5]
#> [1,]    1 0.008677317 -0.5913406 -0.0004170652 -0.07448196
#> [2,]    1 4.389210306 -0.8915451  0.7344121804 -0.15176050
#> 
#> $sigma2
#> [1] 1 1
#> 
sim_parCoef(2, 4, sigma2 = c(2, 4))
#> $ar
#>      [,1]       [,2]       [,3]        [,4]        [,5]
#> [1,]    1 -0.4669751 -0.3597549 0.002854628 0.026370980
#> [2,]    1 -0.9790889  0.1665807 0.208343628 0.005077436
#> 
#> $sigma2
#> [1] 2 4
#> 
sim_parCoef(2, 1)
#> $ar
#>      [,1]       [,2]
#> [1,]    1 -1.6411246
#> [2,]    1 -0.4461489
#> 
#> $sigma2
#> [1] 1 1
#> 
sim_parCoef(4, 2)                    # 4 seasons
#> $ar
#>      [,1]       [,2]       [,3]
#> [1,]    1  0.3266282  0.6762625
#> [2,]    1  0.3748450 -0.2563427
#> [3,]    1  1.3403750 -0.5355615
#> [4,]    1 -1.6486829  2.1881068
#> 
#> $sigma2
#> [1] 1 1 1 1
#> 

sim_parCoef(period = 4, n.root = 6,
    eigabs = c(1, 1, 1, 0.036568887, 0.001968887),
    type.eigval = c("cp", "r", "r", "r",  "r"),
    eigsign     = c(pi/2,   1,  -1,   1,   -1))
#> $ar
#>      [,1]       [,2]       [,3]        [,4]       [,5]        [,6]        [,7]
#> [1,]    1  0.6734184 -0.1925968 -0.04595757 -0.4265943  0.76494732  0.41783119
#> [2,]    1  1.3850111 -0.8908136  0.86809532  0.7163844  0.14791760 -0.32713804
#> [3,]    1 -0.3539595  0.7508840  0.43447534 -0.2658097 -0.05473122 -0.01302959
#> [4,]    1  4.4672766  2.5169511 -4.70508659 -0.6387933  0.03731006  0.04042685
#> 
#> $sigma2
#> [1] 1 1 1 1
#>