DESCRIPTION
These programs performs Monte Carlo simulations for the multivariate local level model used as example in the paper (section 6.2.3). 
In order to replicate the simulations in the paper, please, execute the program S623_main.m adjusting T (the sample size) and hypothesis (the data generating process).
To replicate the results for bootstrap critical value calculations execute S623_main_bootstrap.m after S623_main.m has concluded.

The model is given by:
y_t = l*x_t + v_t
(x_t - x_(t-1)) = sqrt(gamma_x)*f_t
v_t = sqrt(gamma_v)*e_t
(f_t,e_t)' are N[0(N+1,1),I(N)] under the null.

The user should set:
- Calibration of the parameters gx and gv;
- Number of Monte Carlo replicas S and sample size T;
- Distribution of the innovations,
hypothesis == 0: null, (f_t,e_t)' is N(0(3,1),I(3)),
hypothesis == 1: alternative, (f_t,e_t)' is t(0(N+1,1),I(N+1),nu),
hypothesis == 2: alternative, f_t is t(0,1,nu) and e_t is N(0(N,1),I(N)),
hypothesis == 3: alternative, f_t is N(0,1) and e_t is t(0(N,1),I(N),nu),
hypothesis == 4: alternative, f_t and e_t are all t(0,1,nu),
hypothesis == 5: alternative, (f_t,e_t)' is t(0(N+1,1),I(N+1),nu,beta),
hypothesis == 6: alternative, f_t is t(0,1,nu,beta) and e_t is N(0(N,1),I(N)),
hypothesis == 7: alternative, f_t is N(0,1) and e_t is t(0(N,1),I(N),nu,beta),
hypothesis == 8: alternative, f_t and e_t are all t(0,1,nu,beta).
Degrees of freedom nu and direction of asymmetry beta should also be set.

The program will compute and save:

- ML estimators and asymptotic variances of (gamma_x,gamma_v),
- Scores with respect to the shape parameters,
- Asymptotic variances of the scores,
- Test statistics.

The programs will create files with names:
- estimate_'T'_'H'.mat, containing data and ML estimates,
- score_'T'_'H'.mat, shape parameter scores,
- stderr_'T'_'H'.mat, containing asymptotic variances of scores,
- test_'T'_'H'.mat, containing the test statistics.
- hac_'T'.mat, containing the HAC-based test statistics.
- bootstrap_'T'.mat, containing the test statistic over simulated bootstrap samples.
- critical_'T'.mat, containing the bootstrap critical values.
- bootstrap_test_'T'_'H'.mat, containing the bootstrap-based tests.
'T' is replaced by the sample size and 'H' by the hypothesis of the simulations.

INFORMATION
Authors: Almuzara, Amengual, Sentana.
Date: November 2017. Revised: November 2018.
