Vector Autoregressive Moving-Average Models (Cpp)
Performs conditional maximum likelihood estimation of a VARMA model. Multivariate Gaussian likelihood function is used. This is the same function as VARMA, with the likelihood function implemented in C++ for efficiency.
VARMACpp(da, p = 0, q = 0, include.mean = T, fixed = NULL, beta=NULL, sebeta=NULL, prelim = F, details = F, thres = 2)
da
: Data matrix (T-by-k) of a k-dimensional time series with sample size T.p
: AR orderq
: MA orderinclude.mean
: A logical switch to control estimation of the mean vector. Default is to include the mean in estimation.fixed
: A logical matrix to control zero coefficients in estimation. It is mainly used by the command refVARMA.beta
: Parameter estimates to be used in model simplification, if neededsebeta
: Standard errors of parameter estimates for use in model simplificationprelim
: A logical switch to control preliminary estimation. Default is none.details
: A logical switch to control the amount of output.thres
: A threshold used to set zero parameter constraints based on individual t-ratio. Default is 2.The fixed command is used for model refinement
data: Observed data matrix
ARorder: VAR order
MAorder: VMA order
cnst: A logical switch to include the mean vector
coef: Parameter estimates
secoef: Standard errors of the estimates
residuals: Residual matrix
Sigma: Residual covariance matrix
aic,bic: Information criteria of the fitted model
Phi: VAR coefficients
Theta: VMA coefficients
Ph0: The constant vector
Tsay (2014, Chapter 3). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.
Ruey S. Tsay
VARMA
phi=matrix(c(0.2,-0.6,0.3,1.1),2,2); theta=matrix(c(-0.5,0,0,-0.5),2,2) sigma=diag(2) m1=VARMAsim(300,arlags=c(1),malags=c(1),phi=phi,theta=theta,sigma=sigma) zt=m1$series m2=VARMA(zt,p=1,q=1,include.mean=FALSE)
Useful links