sim.ARMA | R Documentation |
Simulates an ARMA, AR or MA process according to the arguments given.
sim.ARMA( n, ar = NULL, ma = NULL, sigma = 1, eta = NULL, method = "strong", k = 1, mu = 0, ... )
n |
Number of observations. |
ar |
Vector of AR coefficients. If |
ma |
Vector of MA coefficients. If |
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'. |
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
.
Returns a vector containing the n
simulated observations of the
time series.
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
arima.sim
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.