vma.sim {portes} | R Documentation |
Compute The Vector of Moving Average Model (VMA)
Description
This utility function is useful to use in the function varima.sim
and may used to compute the coefficients of moving-average or vector moving-average.
Usage
vma.sim(psi, a)
Arguments
psi |
the impulse coefficients. |
a |
innovations |
Value
Vector of length (in the univariate case), or
matrices (in the multivariate case),
where
= length(
)-length(
) and
is the dimension of the series.
Author(s)
Esam Mahdi and A.I. McLeod.
References
Hannan, E.J. (1970). "Multiple Time Series". New York: Wiley.
Hipel, K.W. and McLeod, A.I. (2005). "Time Series Modelling of Water Resources and Environmental Systems".
See Also
convolve
, varima.sim
, arima.sim
, ImpulseVMA
,
InvertQ
Examples
k <- 2
n <- 300
trunc.lag <- 50
ar <- array(c(0.5,0.4,0.1,0.5),dim=c(k,k,1))
ma <- array(c(0,0.25,0,0),dim=c(k,k,1))
sigma <- matrix(c(1,0.71,0.71,2),k,k)
p <- ifelse(is.null(ar),0,dim(ar)[3])
q <- ifelse(is.null(ma),0,dim(ma)[3])
r <- max(p, q)
d <- trunc.lag + r
psi <- ImpulseVMA(ar = ar, ma = ma, trunc.lag = trunc.lag)
a <- t(crossprod(chol(sigma),matrix(rnorm(k*d),ncol=d)))
vma.sim(psi = psi, a = a)
[Package portes version 6.0 Index]