sim.ARMA: Simulation of ARMA(p,q) model.

sim.ARMAR Documentation

Simulation of ARMA(p,q) model.

Description

Simulates an ARMA, AR or MA process according to the arguments given.

Usage

sim.ARMA(
  n,
  ar = NULL,
  ma = NULL,
  sigma = 1,
  eta = NULL,
  method = "strong",
  k = 1,
  mu = 0,
  ...
)

Arguments

n

Number of observations.

ar

Vector of AR coefficients. If NULL, the simulation is a MA process.

ma

Vector of MA coefficients. If NULL, the simulation is a AR process.

sigma

Standard deviation.

eta

Vector of white noise sequence. Allows the user to use his own white noise.

method

Defines the kind of noise used for the simulation. By default, the noise used is strong. See 'Details'.

k

Integer used in the creation of the noise. See 'Details'.

mu

Integer for the mean of the series.

...

Arguments needed to simulate GARCH noise. See 'Details'.

Details

ARMA model is of the following form :

X_{t}-μ = e_{t} + a_{1} (X_{t-1}-μ) + a_{2} (X_{t-2}-μ) + ... + a_{p} (X_{t-p}-μ) - b_1 e_{t-1} - b_2 e_{t-2} - ... - b_{q} e_{t-q}

where e_t is a sequence of uncorrelated random variables with zero mean and common variance σ^{2} > 0 . ar = (a_{1}, a_{2}, ..., a_{p}) are autoregressive coefficients and ma = (b_{1}, b_{2}, ... , b_{q}) are moving average coefficients. Characteristic polynomials of ar and ma must constitute a stationary process.

Method "strong" realise a simulation with gaussian white noise.

Method "product", "ratio" and "product.square" realise a simulation with a weak white noise. These methods employ respectively the functions wnPT, wnRT and wnPT_SQ to simulate nonlinear ARMA model. So, the paramater k is an argument of these functions. See wnPT, wnRT or wnPT_SQ.

Method "GARCH" gives an ARMA process with a GARCH noise. See simGARCH.

Value

Returns a vector containing the n simulated observations of the time series.

References

Francq, C. and Zakoïan, J.M. 1998, Estimating linear representations of nonlinear processes, Journal of Statistical Planning and Inference, vol. 68, no. 1, pp. 145-165

See Also

arima.sim

Examples

y <- sim.ARMA(n = 100, ar = 0.95, ma = -0.6, method = "strong" )
y2 <- sim.ARMA(n = 100, ar = 0.95, ma = -0.6, method = "ratio")
y3 <- sim.ARMA(n = 100,  ar = 0.95, ma = -0.6, method = "GARCH", c = 1, A = 0.1, B = 0.88)
y4 <- sim.ARMA(n = 100, ar = 0.95, ma = -0.6, method = "product")
y5 <- sim.ARMA(n = 100, ar = 0.95, ma = -0.6, method = "product.square")


weakARMA documentation built on April 5, 2022, 1:16 a.m.