tsdata_to_infocrit

Calculate Akaike and Bayesian information criteria for VAR models from time series data

Syntax

   [aic,bic,moaic,mobic] = tsdata_to_infocrit(X,morder,regmode,verb)

Arguments

See also Common variable names and data structures. time sries data input

   X          multi-trial time series data
   morder     maximum VAR model order or vector of model orders (see Description)
   regmode    regression mode: 'LWR' (default) or 'OLS'
   verb       verbosity flag: true (default) or false

output

   aic        vector of AIC values
   bic        vector of BIC values
   moaic      optimal model order according to AIC
   mobic      optimal model order according to BIC

Description

Calculates Akaike (AIC) and Bayesian (BIC) information criteria for VAR models from time series data X, which may be single- or multi-trial. Information criteria are returned in the (column) vectors aic, bic; see infocrit. Optimal model orders according to the respective criteria are returned in moaic, mobic.

The regression mode is set by the regmode parameter, which may be 'LWR' (default) or 'OLS'. The former uses Morf's version of the LWR algorithm [1,2] while the latter calculates the OLS solution to regressions via QR decomposition. The LWR algorithm should be faster, as regressions are performed recursively so that the information criteria may be calculated "on the fly".

The LWR algorithm must fit a VAR model at all model orders up to the maximum; in this case the morder parameter must be a scalar representing the maximum model order. For the OLS mode, morder may again be a scalar representing the maximum model order, or it may be a vector of model orders.

If the verb (verbosity) flag is set (default), progress is reported; otherwise only warnings are reported.

If a VAR parameter estimate fails - because of ill-conditioned regression, or the residuals covariance matrix comes out as non positive-definite - a NaN is returned for that model order. This may be an indication that the time series data on which the autocovariance sequence estimate was based is not sufficiently stationary, is not of sufficient length, has (possibly lagged) colinearities, or has a highly skewed distribution.

References

[1] L. Barnett and A. K. Seth, The MVGC Multivariate Granger Causality Toolbox: A New Approach to Granger-causal Inference, J. Neurosci. Methods 223, 2014 [ preprint ].

[2] M. Morf, A. Viera, D. T. L. Lee and T. Kailath, "Recursive Multichannel Maximum Entropy Spectral Estimation", IEEE Trans. Geosci. Elec., 16(2), 1978.

See also

infocrit | tsdata_to_var | mvgc_demo