ngsim {TSSS}R Documentation

Simulation by Non-Gaussian State Space Model

Description

Simulation by non-Gaussian state space model.

Usage

ngsim(n = 200, trend = NULL, seasonal.order = 0, seasonal = NULL, arcoef = NULL, 
      ar = NULL, noisew = 1, wminmax = NULL, paramw = NULL, noisev = 1,
      vminmax = NULL, paramv = NULL, seed = NULL, plot = TRUE, ...)

Arguments

n

number of data generated by simulation.

trend

initial values of trend component of length m1, where m1 is trend order (1, 2). If NULL (default), trend order is 0.

seasonal.order

order of seasonal component model (0, 1, 2).

seasonal

if seasonal.order > 0, initial values of seasonal component of length p-1, where p is period of one season.

arcoef

AR coefficients.

ar

initial values of AR component.

noisew

type of the observational noise.

-1 : Cauchy random number
-2 : exponential distribution
-3 : double exponential distribution
0 : double exponential distribution (+ Euler's constant)
1 : normal distribution (generated by inverse function)
2 : Pearson distribution (generated by inverse function)
3 : double exponential distribution (generated by inverse function)
wminmax

lower and upper bound of observational noise.

paramw

parameter of the observational noise density.

noisew = 1 : variance
noisew = 2 : dispersion parameter (tau square) and shape parameter
noisev

type of the system noise.

-1 : Cauchy random number
-2 : exponential distribution
-3 : double exponential distribution
0 : double exponential distribution (+ Euler's constant)
1 : normal distribution (generated by inverse function)
2 : Pearson distribution (generated by inverse function)
3 : double exponential distribution (generated by inverse function)
vminmax

lower and upper bound of system noise.

paramv

parameter of the system noise density.

noisev = 1 : variance
noisev = 2 : dispersion parameter (tau square) and shape parameter
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.

...

graphical arguments passed to plot.simulate.

Value

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

References

Kitagawa, G. (2020) Introduction to Time Series Modeling with Applications in R. Chapman & Hall/CRC.

Examples

ar1 <- ngsim(n = 400, arcoef = 0.95, noisew = 1, paramw = 1, noisev = 1,
             paramv = 1, seed = 555)
plot(ar1, use = c(201, 400))

ar2 <- ngsim(n = 400, arcoef = c(1.3, -0.8), noisew = 1, paramw = 1, noisev = 1,
             paramv = 1, seed = 555)
plot(ar2, use = c(201, 400))



[Package TSSS version 1.3.4-5 Index]