1 /*
2  *  gretl -- Gnu Regression, Econometrics and Time-series Library
3  *  Copyright (C) 2001 Allin Cottrell and Riccardo "Jack" Lucchetti
4  *
5  *  This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation, either version 3 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef VARTEST_H_
21 #define VARTEST_H_
22 
23 #define N_IVALS 3
24 #define VAR_S_DFCORR 0
25 
26 void gretl_VAR_clear (GRETL_VAR *var);
27 
28 void VAR_fill_X (GRETL_VAR *v, int p, const DATASET *dset);
29 
30 void VAR_write_A_matrix (GRETL_VAR *v, GretlMatrixMod mod);
31 
32 gretl_matrix *decompanionize (const gretl_matrix *A, int neqns,
33 			      GretlMatrixMod mod);
34 
35 int johansen_stage_1 (GRETL_VAR *jvar, const DATASET *dset,
36 		      gretlopt opt, PRN *prn);
37 
38 double gretl_VAR_ldet (GRETL_VAR *var, const gretl_matrix *E,
39 		       int *err);
40 
41 int VAR_LR_lag_test (GRETL_VAR *var, const gretl_matrix *E);
42 
43 int VAR_portmanteau_test (GRETL_VAR *var);
44 
45 int VAR_do_lagsel (GRETL_VAR *var, const DATASET *dset,
46 		   gretlopt opt, PRN *prn);
47 
48 int VAR_wald_omit_tests (GRETL_VAR *var);
49 
50 gretl_matrix *VAR_coeff_matrix_from_VECM (GRETL_VAR *var,
51 					  int Atrans);
52 
53 gretl_matrix *reorder_responses (const GRETL_VAR *var, int *err);
54 
55 void copy_north_west (gretl_matrix *targ,
56 		      const gretl_matrix *src,
57 		      int add);
58 
59 gretl_matrix *irf_bootstrap (GRETL_VAR *var,
60 			     int targ, int shock,
61 			     int periods, double alpha,
62 			     gretl_matrix *point,
63 			     const DATASET *dset,
64 			     int *err);
65 
66 #endif /* VARTEST_H_ */
67