genmain

genmain

Functions

Types and Values

Description

Functions

model_data_scalar()

#define model_data_scalar(i) (i > R_MAX && i < M_SCALAR_MAX)

model_data_series()

#define model_data_series(i) (i > M_SCALAR_MAX && i < M_SERIES_MAX)

model_data_matrix()

#define model_data_matrix(i) (i > M_SERIES_MAX && i < M_MATRIX_MAX)

model_data_matrix_builder()

#define model_data_matrix_builder(i) (i > M_MATRIX_MAX && i < M_MBUILD_MAX)

model_data_list()

#define model_data_list(i)   (i > M_MBUILD_MAX && i < M_LIST_MAX)

model_data_string()

#define model_data_string(i) (i > M_LIST_MAX && i < M_PARNAMES)

model_data_array()

#define model_data_array(i) (i == M_PARNAMES)

generate ()

int
generate (const char *line,
          DATASET *dset,
          GretlType gtype,
          gretlopt opt,
          PRN *prn);

genr_compile ()

GENERATOR *
genr_compile (const char *s,
              DATASET *dset,
              GretlType gtype,
              gretlopt opt,
              PRN *prn,
              int *err);

execute_genr ()

int
execute_genr (GENERATOR *genr,
              DATASET *dset,
              PRN *prn);

destroy_genr ()

void
destroy_genr (GENERATOR *genr);

genr_get_output_type ()

GretlType
genr_get_output_type (const GENERATOR *genr);

genr_get_output_varnum ()

int
genr_get_output_varnum (const GENERATOR *genr);

genr_get_output_scalar ()

double
genr_get_output_scalar (const GENERATOR *genr);

genr_get_last_output_type ()

GretlType
genr_get_last_output_type (void);

genr_get_output_matrix ()

gretl_matrix *
genr_get_output_matrix (GENERATOR *genr);

series_index ()

int
series_index (const DATASET *dset,
              const char *varname);

Parameters

dset

data information struct.

 

varname

name of variable to test.

 

Returns

the ID number of the variable whose name is given, or the next available ID number if there is no variable of that name.


series_greatest_index ()

int
series_greatest_index (const DATASET *dset,
                       const char *varname);

Parameters

dset

data information struct.

 

varname

name of variable to test.

 

Returns

the ID number of the variable whose name is given, or the next available ID number if there is no variable of that name. In contrast to series_index() this variant searches down from the greatest current series ID.


current_series_index ()

int
current_series_index (const DATASET *dset,
                      const char *vname);

caller_series_index ()

int
caller_series_index (const DATASET *dset,
                     const char *vname);

Parameters

dset

data information struct.

 

varname

name of series to test.

 

Returns

the ID number of the series whose name is given, at the caller's level of function execution, or -1 if there's no matching series.


extract_varname ()

int
extract_varname (char *targ,
                 const char *src,
                 int *len);

Writes up to VNAMELEN - 1 characters from s into vname .

Parameters

targ

target string into which to write name.

 

src

source string.

 

len

location to receive the length of the extracted portion.

 

Returns

0 on success, non-zero if the number of valid varname characters in s is greater than VNAMELEN - 1.


genr_fit_resid ()

int
genr_fit_resid (const MODEL *pmod,
                DATASET *dset,
                ModelDataIndex idx);

Adds residuals or fitted values or squared residuals from a given model to the data set.

Parameters

pmod

pointer to source model.

 

dset

dataset struct.

 

idx

M_UHAT, M_UHAT2, M_YHAT, M_AHAT or M_H.

 

Returns

0 on successful completion, error code on error.


evaluate_scalar_genr ()

double
evaluate_scalar_genr (GENERATOR *genr,
                      DATASET *dset,
                      PRN *prn,
                      int *err);

evaluate_if_cond ()

double
evaluate_if_cond (GENERATOR *genr,
                  DATASET *dset,
                  PRN *prn,
                  int *err);

generate_scalar ()

double
generate_scalar (const char *s,
                 DATASET *dset,
                 int *err);

generate_boolean ()

double
generate_boolean (const char *s,
                  DATASET *dset,
                  PRN *prn,
                  int *err);

generate_int ()

int
generate_int (const char *s,
              DATASET *dset,
              int *err);

generate_void ()

int
generate_void (const char *s,
               DATASET *dset,
               PRN *prn);

generate_series ()

double *
generate_series (const char *s,
                 DATASET *dset,
                 PRN *prn,
                 int *err);

generate_matrix ()

gretl_matrix *
generate_matrix (const char *s,
                 DATASET *dset,
                 int *err);

generate_string ()

char *
generate_string (const char *s,
                 DATASET *dset,
                 int *err);

generate_list ()

int *
generate_list (const char *s,
               DATASET *dset,
               int ci,
               int *err);

gretl_is_series ()

int
gretl_is_series (const char *name,
                 const DATASET *dset);

gretl_reserved_word ()

int
gretl_reserved_word (const char *str);

Parameters

str

string to be tested.

 

Returns

non-zero if str is a reserved word that cannot figure as the name of a user-defined variable, otherwise 0.


genr_special_word ()

int
genr_special_word (const char *s);

genr_function_word ()

int
genr_function_word (const char *s);

genr_no_assign ()

int
genr_no_assign (const GENERATOR *p);

genr_is_autoregressive ()

int
genr_is_autoregressive (const GENERATOR *p);

genr_set_na_check ()

void
genr_set_na_check (GENERATOR *genr);

genr_unset_na_check ()

void
genr_unset_na_check (GENERATOR *genr);

genr_reset_uvars ()

void
genr_reset_uvars (GENERATOR *genr);

function_lookup ()

int
function_lookup (const char *s);

is_function_alias ()

int
is_function_alias (const char *s);

const_lookup ()

int
const_lookup (const char *s);

get_const_by_name ()

double
get_const_by_name (const char *name,
                   int *err);

gretl_function_complete ()

const char *
gretl_function_complete (const char *s);

gretl_function_hash_cleanup ()

void
gretl_function_hash_cleanup (void);

set_mpi_rank_and_size ()

void
set_mpi_rank_and_size (int rank,
                       int size);

Types and Values

enum RetrievalIndex

Members

R_NOBS

   

R_NVARS

   

R_PD

   

R_PANEL_PD

   

R_T1

   

R_T2

   

R_TMAX

   

R_DATATYPE

   

R_WINDOWS

   

R_VERSION

   

R_ERRNO

   

R_SEED

   

R_HUGE

   

R_DSET_MAX

   

R_TEST_LNL

   

R_STOPWATCH

   

R_TEST_BRK

   

R_LOGLEVEL

   

R_LOGSTAMP

   

R_SCALAR_MAX

   

R_INDEX

   

R_PUNIT

   

R_OBSMAJ

   

R_OBSMIN

   

R_OBSMIC

   

R_DATES

   

R_SERIES_MAX

   

R_TEST_STAT

   

R_TEST_PVAL

   

R_NOW

   

R_RESULT

   

R_PNGFONT

   

R_MAPFILE

   

R_MAP

   

R_MAX

   

enum ModelDataIndex

Symbolic names for variables that can be retrieved from gretl models.

Members

M_ESS

   

M_T

   

M_RSQ

   

M_SIGMA

   

M_DF

   

M_NCOEFF

   

M_LNL

   

M_GMMCRIT

   

M_AIC

   

M_BIC

   

M_HQC

   

M_TRSQ

   

M_DW

   

M_DWPVAL

   

M_FSTT

   

M_CHISQ

   

M_DIAGTEST

   

M_DIAGPVAL

   

M_SCALAR_MAX

   

M_UHAT

   

M_YHAT

   

M_LLT

   

M_AHAT

   

M_H

   

M_SAMPLE

   

M_UHAT2

   

M_SERIES_MAX

   

M_COEFF

   

M_SE

   

M_VCV

   

M_RHO

   

M_COMPAN

   

M_XTXINV

   

M_VECG

   

M_EVALS

   

M_JALPHA

   

M_JBETA

   

M_JVBETA

   

M_JS00

   

M_JS11

   

M_JS01

   

M_HAUSMAN

   

M_SARGAN

   

M_SYSGAM

   

M_SYSA

   

M_SYSB

   

M_FCAST

   

M_FCSE

   

M_COEFF_CI

   

M_EHAT

   

M_PMANTEAU

   

M_ODDSRATIOS

   

M_MATRIX_MAX

   

M_EC

   

M_VMA

   

M_FEVD

   

M_MNLPROBS

   

M_ALLPROBS

   

M_MBUILD_MAX

   

M_XLIST

   

M_YLIST

   

M_LIST_MAX

   

M_COMMAND

   

M_DEPVAR

   

M_PARNAMES

   

M_MAX

   

enum BundleDataIndex

Members

B_MODEL

   

B_SYSTEM

   

B_SYSINFO

   

GENERATOR

typedef struct parser_ GENERATOR;