simssm {TSSS} | R Documentation |
Simulate time series by Gaussian State Space Model.
simssm(n = 200, trend = NULL, seasonal.order = 0, seasonal = NULL, arcoef = NULL, ar = NULL, tau1 = NULL, tau2 = NULL, tau3 = NULL, sigma2 = 1.0, seed = NULL, plot = TRUE, ...)
n |
the number of simulated data. |
trend |
initial values of trend component of length at most 2. |
seasonal.order |
seasonal order. (0 or 1) |
seasonal |
if |
arcoef |
AR coefficients. |
ar |
initial values of AR component. |
tau1 |
variance of trend component model. |
tau2 |
variance of AR component model. |
tau3 |
variance of seasonal component model. |
sigma2 |
variance of the observation noise. |
seed |
arbitrary positive integer to generate a sequence of uniform random numbers. The default seed is based on the current time. |
plot |
logical. If |
... |
further arguments to be passed to |
An object of class "simulate"
, giving simulated data of Gaussian state
space model.
Kitagawa, G. (2010) Introduction to Time Series Modeling. Chapman & Hall/CRC.
# BLSALLFOOD data data(BLSALLFOOD) m1 <- 2; m2 <- 1; m3 <- 2 z <- season(BLSALLFOOD, trend.order = m1, seasonal.order = m2, ar.order = m3) nl <- length(BLSALLFOOD) trend <- z$trend[m1:1] arcoef <- z$arcoef period <- 12 seasonal <- z$seasonal[(period-1):1] ar <- z$ar[m3:1] tau1 <- z$tau2[1] tau2 <- z$tau2[2] tau3 <- z$tau2[3] simssm(n = nl, trend, seasonal.order = m2, seasonal, arcoef, ar, tau1, tau2, tau3, sigma2 = z$sigma2, seed = 333)