simssm

0th

Percentile

Simulation by Gaussian State Space Model

Simulate time series by Gaussian State Space Model.

Keywords
ts
Usage
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, …)
Arguments
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 seasonal.order > 0, initial values of seasonal component of length \(p-1\), where \(p\) is the number of season in one period.

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 TRUE (default), simulated data are plotted.

further arguments to be passed to plot.simulate.

Value

An object of class "simulate", giving simulated data of Gaussian state space model.

References

Kitagawa, G. (2010) Introduction to Time Series Modeling. Chapman & Hall/CRC.

Aliases
  • simssm
Examples
# NOT RUN {
# 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)
# }
Documentation reproduced from package TSSS, version 1.2.3, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.