var_to_tsdata

Generate random multi-trial Gaussian VAR time series

Syntax

   [X,E,mtrunc] = var_to_tsdata(A,SIG,m,N,mtrunc,decayfac)

Arguments

See also Common variable names and data structures.

input

   A          VAR coefficients matrix
   SIG        residuals covariance matrix
   m          number of observations per trial
   N          number of trials (default: 1)
   mtrunc     number of initial time observations to truncate or (default) empty for automatic calculation
   decayfac   initial transients decay factor (default: 100)

output

   X          multi-trial Gaussian VAR time series
   E          residuals time series
   mtrunc     actual number of initial time steps truncated

Description

Return N time series of length m sampled from a VAR model with coefficients matrix A, and iid Gaussian residuals with covariance matrix SIG:

If mtrunc is supplied it is taken to be the the number of initial (non-stationary transient) observations to truncate; otherwise (default) the spectral radius of A (see function var_specrad) is calculated and used to estimate a suitable number mtrunc of observations to assumed stationarity (roughly till autocovariance decays to near zero). Set decayfac larger for longer settle time.

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 ].

See also

var_specrad | genvar