rar | R Documentation |
Generates a zero mean vector autoregressive process of a given order.
rar( n, d = 2, Psi = NULL, burnin = 10, noise = c("mnormal", "mt"), sigma = NULL, df = 4 )
n |
number of observations to generate. |
d |
dimension of the time series. |
Psi |
array of p ≥q 1 coefficient matrices. |
burnin |
an integer ≥q 0. It specifies a number of initial observations to be trashed to achieve stationarity. |
noise |
|
sigma |
covariance or scale matrix of the innovations. By default the identity matrix. |
df |
degrees of freedom if |
We simulate a vector autoregressive process
X_t=∑_{k=1}^p Ψ_k X_{t-k}+\varepsilon_t,\quad 1≤q t≤q n.
The innovation process \varepsilon_t is either multivariate normal or multivariate
t with a predefined covariance/scale matrix sigma and zero mean. The noise is generated
with the package mvtnorm
. For Gaussian noise we use rmvnorm
. For Student-t noise
we use rmvt
. The parameters sigma and df are imported as arguments, otherwise we use default
settings. To initialise the process we set
[X_{1-p},…,X_{0}]=[\varepsilon_{1-p},…,\varepsilon_{0}]. When burnin
is set
equal to K then, n+K observations are generated and the first K will be trashed.
A matrix with d
columns and n
rows. Each row corresponds to one time point.
rma
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.