# dlmModSeas: Create a DLM for seasonal factors In dlm: Bayesian and Likelihood Analysis of Dynamic Linear Models

## Description

The function creates a DLM representation of seasonal component.

## Usage

 ```1 2 3``` ```dlmModSeas(frequency, dV = 1, dW = c(1, rep(0, frequency - 2)), m0 = rep(0, frequency - 1), C0 = 1e+07 * diag(nrow = frequency - 1)) ```

## Arguments

 `frequency` how many seasons? `dV` variance of the observation noise. `dW` diagonal elements of the variance matrix of the system noise. `m0` m0, the expected value of the pre-sample state vector. `C0` C0, the variance matrix of the pre-sample state vector.

## Value

An object of class dlm representing a seasonal factor for a process with `frequency` seasons.

## Author(s)

Giovanni Petris [email protected]

## References

Giovanni Petris (2010), An R Package for Dynamic Linear Models. Journal of Statistical Software, 36(12), 1-16. http://www.jstatsoft.org/v36/i12/.
Petris, Petrone, and Campagnoli, Dynamic Linear Models with R, Springer (2009).
Harvey, Forecasting, structural time series models and the Kalman filter, Cambridge University Press, 1989.

`dlmModARMA`, `dlmModPoly`, `dlmModReg`, and `dlmModTrig` for the Fourier representation of a seasonal component.

## Examples

 ```1 2``` ```## seasonal component for quarterly data dlmModSeas(4, dV = 3.2) ```

### Example output

```\$FF
[,1] [,2] [,3]
[1,]    1    0    0

\$V
[,1]
[1,]  3.2

\$GG
[,1] [,2] [,3]
[1,]   -1   -1   -1
[2,]    1    0    0
[3,]    0    1    0

\$W
[,1] [,2] [,3]
[1,]    1    0    0
[2,]    0    0    0
[3,]    0    0    0

\$m0
[1] 0 0 0

\$C0
[,1]  [,2]  [,3]
[1,] 1e+07 0e+00 0e+00
[2,] 0e+00 1e+07 0e+00
[3,] 0e+00 0e+00 1e+07
```

dlm documentation built on June 14, 2018, 1:03 a.m.