estimation of a (V)ARMA(X) model
result=varma(endo,AR,ARS,MA,MAS,v,s,arg1,...argn)
* endo = either
- a (Txn) real matrix
- a matrix of strings, each one being the name of a variable
- a timeseries
- a list of variables; each element could be a timeseries, a real vector, a real matrix or a string (the name of a variable with one of the types cited above, between quotes)
* AR = the matrix [] or a (n x (n*p)) matrix with:
- n = # of endogenous variables
- p = # of lags in the AR part of the process
* ARS = the matrix [] or a (n x (n*ps)) matrix with:
- ps = # of lags in the seasonal AR part of the process
* MA = the matrix [] or a (n x (n*q)) matrix
* with:
- q = # of lags in the AM part of the process
* MAS = the matrix [] or a (n x (n*qs)) matrix x
with:
- qs = # of lags in the seasonal MA part of the process
* v = a (nx1) vector if the user wants to impose independence between resisduals or a (nxn) matrix in the other case
* s = a scalar representing the seasonality
* argi = optional arguments that can be:
- 'init=own' if the users wants to use as starting values of the optimisation algorithm those given by her as entry of varma
- 'exo=xxx' where xxx is the names of exogenous variables which can take the form of a list or a vector of strings
- 'Gexo=xxx' where xxx is a vector of coefficients corresponding to the exogenous variables
- 'delta=xx' where xx is the increment used to calculate the numerical derivative of the log-likelihood (default: sqrt(%eps))
- 'noprint' if the user does not want to print the results
- 'dropna' if the user wants to remove the NA values from the data
-'optfunc=optim' if the user wants to use the optim optimisation function (default: optimg)
-'opt_nelmead=crit,nitermax' with crit the value of the convergence criterion in the Nelder-Meade optimisation function and nitermax the maximum number of iterations (default = 'opt_nelmead=2*%eps,1000')
-'opt_optim=opts' where opts are options for optim that can be entered after the starting value of the parameters (default = 'opt_optim=,''ar'',1e6,1e6'')
-'opt_convg=val' where val is the threshold on gradient norm (default = 'opt_convg=1e-5')
* result = a results tlist with:
- result('meth') ='varma'
- result('y') = (nobsxnendo) matrix of values for the endogenous variables
- result('namey') = (nvarx1) vector of names for the endogenous variables
- result('z') = (nobsx(nendo+nexo)) matrix of endogenous and exogenous variables
- result('nobs') = # of observations
- result('nendo') = # of endogenous variables
- result('nvar') = # of endogenous and exogenous variables
- result('coeff') = (npx1) vector of estimated parameters
- result('lab') = (npx1) string vector of names for the estimated parameters
- result('llike') = log-likelihood of the model
- result('grad') = gradient of the log-likelihood of the model at the estimated parameters
- result('tstat') = Student's t of the coefficients
- result('std') = (npx1) Student's t of the coefficients
- result('corr') = (npxnp) correlation matrix
- result('AIC') = Akaike information criterion
- result('BIC') = Schwartz information criterion
- result('theta2mat') = (npx1) string vector making the transformation of the vector of estimated parameters into the matrices of the problem
- result('seas') = order of the seasonality
- result('nexo') = # of exogenous variables in the model
- result('resid') = (nobsx1) vector of filtered residuals
- result('AR') = the estimated AR part of the ARMA
- result('MA') = the estimated MA part of the ARMA
- result('ARS') = the estimated seasonal AR part of the ARMA
- result('MAS') = the estimated seasonal MA part of the ARMA
- result('V') = the estimated variance of residuals
- result('G') = the estimated variance of residuals
- result('k') = maximum degree of the total AR, MA and G parts
- result('p') = # of AR parameters
- result('P') = # of ARS parameters
- result('q') = # of MA parameters
- result('Q') = # of MAS parameters
- result('lagexo') = # of lags applied to the vector of exogenous variables
- result('k') = n*nendo
- result('type') = type of the e4 model
- result('userflag') = a boolean equal to %f indicating that the likelihood function has not been provided by the user (a e4 parameter)
- result('innov') = a flag indicating that this is an innovation model (a e4 parameter)
- result('prests') = a boolean signaling the presence or absence of a ts in the model
- result('E4OPTION') = the list of options used to perform optimisation (see sete4opt for details)
- result('yhat') = adjusted y
- result('resid') = residuals of the VARMA
- result('std resid') = standardized residuals of the VARMA
- result('exo') = value of the exogenous variables (if any)
- result('exo') = name of the exogenous variables (if any)
- result('bounds') = bounds of the estimation (if there are ts in the regression)
- result('dropna') = boolean indicating if NAs have been droped
- result('nonna') = vector indicating position of non-NA values (if the option 'dropna' was active)
AR(L)*ARS(L^s) y = MA(L)*MAS(L^s) e [+G(L)X]
where L is the lag operator, X is an optional vector of exogenous variables
load(GROCERDIR+'/data/varma_d.dat'); elec_cons = transdif(seriesa,0,1,1,12); results=varma(elec_cons,[],[],0,0,0,12) // Provides the estimation of a VARMA model without AR part and without exogenous variables (in particular without constant) // Series are monthly and starting values for the 3 estimated parameters (the first MA parameter, the first // seasonal MA and the variance of residuals) are all 0. | ![]() | ![]() |