File: lagpref.h

package info (click to toggle)
gretl 2016d-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 48,620 kB
  • ctags: 22,779
  • sloc: ansic: 345,830; sh: 4,648; makefile: 2,712; xml: 570; perl: 364
file content (64 lines) | stat: -rw-r--r-- 2,072 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* 
 *  gretl -- Gnu Regression, Econometrics and Time-series Library
 *  Copyright (C) 2001 Allin Cottrell and Riccardo "Jack" Lucchetti
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */

#ifndef LAGSELECT_H
#define LAGSELECT_H

enum {
    LAG_X = LISTSEP + 1, /* lags set for regular variable context */
    LAG_Y_X,             /* lags for dependent variable */
    LAG_W,               /* lags set for variable as instrument */
    LAG_Y_W,             /* lags for dependent var as instrument */
    LAG_Y_V              /* lags of endoenous vars in VAR */
} LagContext;

#define VDEFLT -1

void enable_lags_for_context (int context, gboolean s);

gboolean lags_enabled_for_context (int context);

void destroy_lag_preferences (void);

int set_lag_prefs_from_list (int v, int *llist, char context,
			     int *changed);

int set_lag_prefs_from_minmax (int v, int lmin, int lmax,
			       char context, int *changed);

void set_null_lagpref (int v, char context, int *changed);

int set_lag_prefs_from_model (int dv, int *xlist, int *zlist);

int set_lag_prefs_from_VAR (const int *lags, int *xlist);

int *get_lag_pref_as_list (int v, char context);

int remove_specific_lag (int v, int lag, char context);

int is_lag_dummy (int v, int lag, char context);

const int *get_VAR_lags_list (void);

void set_VAR_max_lag (int lmax);

void get_lag_preference (int v, int *lmin, int *lmax, const int **laglist,
			 char context, selector *sr);

#endif