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 QR_ESTIMATE_H
21 #define QR_ESTIMATE_H
22 
23 int gretl_qr_regress (MODEL *pmod, DATASET *dset, gretlopt opt);
24 
25 int lapack_cholesky_regress (MODEL *pmod, const DATASET *dset,
26 			     gretlopt opt);
27 
28 int qr_tsls_vcv (MODEL *pmod, const DATASET *dset, gretlopt opt);
29 
30 int qr_matrix_hccme (const gretl_matrix *X,
31 		     const gretl_matrix *h,
32 		     const gretl_matrix *XTXi,
33 		     gretl_matrix *d,
34 		     gretl_matrix *VCV,
35 		     int hc_version);
36 
37 double hac_weight (int kern, int h, int i);
38 
39 double qs_hac_weight (double bt, int i);
40 
41 int maybe_limit_VAR_coeffs (gretl_matrix *A,
42 			    gretl_matrix *Y,
43 			    gretl_matrix *X,
44 			    gretl_matrix *E);
45 
46 int newey_west_bandwidth (const gretl_matrix *f,
47 			  const gretl_matrix *w,
48 			  int kern, int prewhitened,
49 			  int *h, double *bt);
50 
51 gretl_matrix *HAC_XOX (const gretl_matrix *X,
52 		       const gretl_matrix *uhat,
53 		       VCVInfo *vi, int use_prior,
54 		       int *err);
55 
56 gretl_matrix *newey_west_OPG (const gretl_matrix *G,
57 			      int *err);
58 
59 gretl_matrix *long_run_covariance (const gretl_matrix *X,
60 				   int demean, int *err);
61 
62 int set_cluster_vcv_ci (int ci);
63 
64 #endif  /* QR_ESTIMATE_H */
65