genmain

genmain

Functions

Types and Values

Object Hierarchy


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_MAX)


generate ()

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

Returns


genr_compile ()

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

Returns


execute_genr ()

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

Returns


destroy_genr ()

void
destroy_genr (GENERATOR *genr);


genr_get_output_type ()

int
genr_get_output_type (const GENERATOR *genr);

Returns


genr_get_output_varnum ()

int
genr_get_output_varnum (const GENERATOR *genr);

Returns


genr_get_output_scalar ()

double
genr_get_output_scalar (const GENERATOR *genr);

Returns


genr_get_last_output_type ()

int
genr_get_last_output_type (void);

Returns


genr_get_output_matrix ()

gretl_matrix *
genr_get_output_matrix (const GENERATOR *genr);

Returns


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);

Returns


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_if_cond ()

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

Returns


generate_scalar ()

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

Returns


generate_series ()

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

Returns


generate_matrix ()

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

Returns


generate_string ()

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

Returns


generate_list ()

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

Returns


gretl_is_series ()

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

Returns


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);

Returns


genr_function_word ()

int
genr_function_word (const char *s);

Returns


genr_is_print ()

int
genr_is_print (const GENERATOR *p);

Returns


genr_is_autoregressive ()

int
genr_is_autoregressive (const GENERATOR *p);

Returns


genr_set_na_check ()

void
genr_set_na_check (GENERATOR *genr);


genr_unset_na_check ()

void
genr_unset_na_check (GENERATOR *genr);


genr_get_series_max ()

int
genr_get_series_max (GENERATOR *genr);

Returns


function_from_string ()

int
function_from_string (const char *s);

Parameters

s

the string to look up.

 

Returns

1 if there is a function corresponding to the name s , or 0 if there is no such function.


function_lookup ()

int
function_lookup (const char *s);

Returns


const_lookup ()

int
const_lookup (const char *s);

Returns


get_const_by_name ()

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

Returns


gretl_function_complete ()

const char *
gretl_function_complete (const char *s);

Returns


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_T1

   

R_T2

   

R_DATATYPE

   

R_WINDOWS

   

R_VERSION

   

R_ERRNO

   

R_SEED

   

R_HUGE

   

R_DSET_MAX

   

R_TEST_LNL

   

R_KLNL

   

R_KS2

   

R_KSTEP

   

R_STOPWATCH

   

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_MAX

   

enum ModelDataIndex

Symbolic names for various scalars, series and matrices 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_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_FCERR

   

M_COEFF_CI

   

M_KLLT

   

M_KUHAT

   

M_EHAT

   

M_MATRIX_MAX

   

M_EC

   

M_VMA

   

M_FEVD

   

M_MNLPROBS

   

M_MBUILD_MAX

   

M_XLIST

   

M_YLIST

   

M_LIST_MAX

   

M_COMMAND

   

M_DEPVAR

   

M_MAX

   

GENERATOR

typedef struct parser_ GENERATOR;