Name

spectral — non parametric spectral analysis of time series

CALLING SEQUENCE

[rspec]=spectral(arg1,…,argn)

PARAMETERS

Input

• arg1,…,argn = arguments which can be:

 - a string equal to the name of a time series or a (nxk) real vector or matrix between quotes

 - a real (nx1) vector

 - a real (nxk) matrix

 - a list of such elemnts

 - the string 'noprint' if the user doesn't want to display the results of the regression

 - optional arguments that can be the following:

 * 'trunc=xx'  : lag window size (the default value is k=round(sqrt(T)))

 * 'weight=xx' : (N x 1) vector of weights (equal weights by default) for cohesion

 * 'spec=1' : plot spectrum

 * .'dcorr=1'     : plot dynamic correlation

 * 'phase=1' : plot phase spectrum

 * 'coher=1'     : plot coherency

 * 'cohes=1' : plot cohesion

 * 'boot =1'  : performs block-bootstrap estimation of confindence band

 * 'B=xx'  : number of draws for bootstrap replication  (default is 200)

 * 'sb=xx'  : size of blocks for block-bootstrap (default is 8)

Output

• rspec = a results tlist with

  - rspec('cospe') = matrix of cospectra

  - rspec('cohes') = matrix of cohesion (if more than one TS)

  - rspec('coher') = matrix of coherence (if more than one TS)

  - rspec('dcorr') = matrix of dynamic correlations (if more than one TS)

  - rspec('phase') = matrix of standardized phase spectrum (if more than one TS)

  - rspec('order') = order of arrival of variable in cross-products

  - rspec('ucohes') = matrix of upper bound for cohesion (compute by block-bootstrap)

  - rspec('lcohes') = matrix of lower bound for cohesion (compute by block-bootstrap)

  - rspec('ucoher') = matrix of upper bound for coherency (compute by block-bootstrap)

  - rspec('lcoher') = matrix of lower bound for coherency (compute by block-bootstrap)

  - rspec('ucospe') = matrix of upper bound for cospectra (compute by block-bootstrap)

  - rspec('lcospe') = matrix of upper bound for cospectra (compute by block-bootstrap)

  - rspec('udcorr') = matrix of upper bound for dynamic correlations (compute by block-bootstrap)

  - rspec('ldcorr') = matrix of lower bound for dynamic correlations (compute by block-bootstrap)

  - rspec('uphase') = matrix of upper bound for phase spectrum (compute by block-bootstrap)

  - rspec('lphase') = matrix of lower bound for phase spectrum (compute by block-bootstrap)

DESCRIPTION

This function provides standard spectral related tools to analyse stationnary time series. It performs: spectrum, cospectrum, phase spectrum, coherence, dynamic correlation and cohesion.

EXAMPLE

rspec = spectral('dlger','dlfr','dlit','dlsp','trunc=6','spec=1','cospe=1');
 
 Example taken from spectral_d():  performs spectral analysis of QoQ growth rate of French (fr), German (ger), Italian (it) and Spanish (spa) PPP GDP. 
 
               

AUTHOR

Emmanuel Michaux 2005