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 LAGSELECT_H 21 #define LAGSELECT_H 22 23 enum LagContext { 24 LAG_X = LISTSEP + 1, /* lags set for regular variable context */ 25 LAG_Y_X, /* lags for dependent variable */ 26 LAG_W, /* lags set for variable as instrument */ 27 LAG_Y_W, /* lags for dependent var as instrument */ 28 LAG_Y_V /* lags of endoenous vars in VAR */ 29 }; 30 31 #define VDEFLT -1 32 33 void enable_lags_for_context (int context, gboolean s); 34 35 gboolean lags_enabled_for_context (int context); 36 37 void destroy_lag_preferences (void); 38 39 int set_lag_prefs_from_list (int v, int *llist, char context, 40 int *changed); 41 42 int set_lag_prefs_from_minmax (int v, int lmin, int lmax, 43 char context, int *changed); 44 45 void set_null_lagpref (int v, char context, int *changed); 46 47 int set_lag_prefs_from_model (int dv, int *xlist, int *zlist); 48 49 int set_lag_prefs_from_VAR (const int *lags, int *xlist); 50 51 int *get_lag_pref_as_list (int v, char context); 52 53 int remove_specific_lag (int v, int lag, char context); 54 55 int is_lag_dummy (int v, int lag, char context); 56 57 const int *get_VAR_lags_list (void); 58 59 void set_VAR_max_lag (int lmax); 60 61 void get_lag_preference (int v, int *lmin, int *lmax, const int **laglist, 62 char context, selector *sr); 63 64 #endif 65