Skip to contents

Seasonal state block

Usage

seasonal(
  name,
  period,
  type = c("Trigonometric", "Crude", "HarrisonStevens", "Dummy"),
  variance = 0.01,
  fixed = FALSE
)

Arguments

name

Name of the block

period

Period of the seasonality

type

Type of the seasonal component

variance

Innovation variance

fixed

Indicates if the variance is fixed

Examples

seas1<-seasonal("seas1", 12, "HarrisonStevens", variance=1)
print(block_v(seas1))
#>              [,1]        [,2]        [,3]        [,4]        [,5]        [,6]
#>  [1,]  0.91666667 -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [2,] -0.08333333  0.91666667 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [3,] -0.08333333 -0.08333333  0.91666667 -0.08333333 -0.08333333 -0.08333333
#>  [4,] -0.08333333 -0.08333333 -0.08333333  0.91666667 -0.08333333 -0.08333333
#>  [5,] -0.08333333 -0.08333333 -0.08333333 -0.08333333  0.91666667 -0.08333333
#>  [6,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333  0.91666667
#>  [7,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [8,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [9,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#> [10,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#> [11,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>              [,7]        [,8]        [,9]       [,10]       [,11]
#>  [1,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [2,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [3,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [4,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [5,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [6,] -0.08333333 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [7,]  0.91666667 -0.08333333 -0.08333333 -0.08333333 -0.08333333
#>  [8,] -0.08333333  0.91666667 -0.08333333 -0.08333333 -0.08333333
#>  [9,] -0.08333333 -0.08333333  0.91666667 -0.08333333 -0.08333333
#> [10,] -0.08333333 -0.08333333 -0.08333333  0.91666667 -0.08333333
#> [11,] -0.08333333 -0.08333333 -0.08333333 -0.08333333  0.91666667
seas2<-seasonal("seas2", 12, "Trigonometric", variance=1)
print(block_v(seas2))
#>       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
#>  [1,]    6   -1    0   -1    0   -1    0   -1    0    -1     0
#>  [2,]   -1    6   -1    0   -1    0   -1    0   -1     0    -1
#>  [3,]    0   -1    6   -1    0   -1    0   -1    0    -1     0
#>  [4,]   -1    0   -1    6   -1    0   -1    0   -1     0    -1
#>  [5,]    0   -1    0   -1    6   -1    0   -1    0    -1     0
#>  [6,]   -1    0   -1    0   -1    6   -1    0   -1     0    -1
#>  [7,]    0   -1    0   -1    0   -1    6   -1    0    -1     0
#>  [8,]   -1    0   -1    0   -1    0   -1    6   -1     0    -1
#>  [9,]    0   -1    0   -1    0   -1    0   -1    6    -1     0
#> [10,]   -1    0   -1    0   -1    0   -1    0   -1     6    -1
#> [11,]    0   -1    0   -1    0   -1    0   -1    0    -1     6