| Libgretl Reference Manual |
|---|
comparecompare — |
enum SeriesSaveCode; enum ModelAuxCode; double robust_omit_F (const int *list, MODEL *pmod); int add_test (const int *addvars, MODEL *orig, MODEL *new, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn); int omit_test (const int *omitvars, MODEL *orig, MODEL *new, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn); int nonlinearity_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, int aux_code, gretlopt opt, PRN *prn); int reset_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn); int autocorr_test (MODEL *pmod, int order, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn); int chow_test (const char *line, MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn); int cusum_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn); int panel_hausman_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn); int vif_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, PRN *prn); int leverage_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn); int add_leverage_values_to_dataset (double ***pZ, DATAINFO *pdinfo, gretl_matrix *m, unsigned char flags); int lmtest_driver (const char *param, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn);
typedef enum {
SAVE_LEVERAGE = 1 << 0,
SAVE_INFLUENCE = 1 << 1,
SAVE_DFFITS = 1 << 2,
SAVE_TREND = 1 << 3,
SAVE_CYCLE = 1 << 4
} SeriesSaveCode;
typedef enum {
AUX_NONE, /* not an auxiliary regression */
AUX_SQ, /* aux. regression for nonlinearity (squared terms) */
AUX_LOG, /* aux. regression for nonlinearity (log terms) */
AUX_CHOW, /* aux. regression for Chow test */
AUX_ADD, /* aux. regression for adding variables */
AUX_AR, /* aux. regression for autocorrelation test */
AUX_ARCH, /* aux. regression for ARCH test */
AUX_WHITE, /* aux. regression for heteroskedasticity (White's test) */
AUX_COINT, /* aux. regression for cointegreation test */
AUX_DF, /* aux. regression for Dickey-Fuller test */
AUX_ADF, /* aux. regression for augmented Dickey-Fuller test */
AUX_KPSS, /* aux. regression for KPSS test */
AUX_OMIT, /* aux. regression for omitting variables */
AUX_RESET, /* aux. regression for Ramsey's RESET */
AUX_SYS, /* single equation from multivariate system */
AUX_VAR, /* single equation from VAR system */
AUX_VECM, /* single equation from VECM system */
AUX_JOHANSEN, /* Johansen cointegration test */
AUX_GROUPWISE, /* testing for groupwise heteroskedasticity */
AUX_AUX /* auxiliary regression not otherwise specified */
} ModelAuxCode;
double robust_omit_F (const int *list,
MODEL *pmod);
Simple form of Wald F-test for omission of variables. If list
is non-NULL, do the test for the omission of the variables in
list from the model pmod. Otherwise test for omission of
all variables in pmod except for the constant.
list : |
list of variables to omit (or NULL). |
pmod : |
model to be tested. |
| Returns : | Calculated F-value, or NADBL on failure. |
int add_test (const int *addvars,
MODEL *orig,
MODEL *new,
double ***pZ,
DATAINFO *pdinfo,
gretlopt opt,
PRN *prn);
Re-estimate a given model after adding the specified variables.
addvars : |
list of variables to add to original model. |
orig : |
pointer to original model. |
new : |
pointer to receive new model, with vars added. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
opt : |
can contain OPT_Q (quiet) to suppress printing
of the new model, OPT_O to print covariance matrix,
OPT_I for silent operation. Additional options that
are applicable only for 2SLS models: OPT_B (add to
both list of regressors and list of instruments), OPT_T
(add to list of instruments only).
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int omit_test (const int *omitvars,
MODEL *orig,
MODEL *new,
double ***pZ,
DATAINFO *pdinfo,
gretlopt opt,
PRN *prn);
Re-estimate a given model after removing the variables
specified in omitvars, or if omitvars is NULL and
orig was not estimated using two-stage least squares, after
removing the last independent variable in orig.
omitvars : |
list of variables to omit from original model. |
orig : |
pointer to original model. |
new : |
pointer to receive new model, with vars omitted. |
pZ : |
pointer to data array. |
pdinfo : |
information on the data set. |
opt : |
can contain OPT_Q (quiet) to suppress printing
of the new model, OPT_O to print covariance matrix,
OPT_I for silent operation. Additional options that
are applicable only for 2SLS models: OPT_B (omit from
both list of regressors and list of instruments), OPT_T
(omit from list of instruments only).
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int nonlinearity_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, int aux_code, gretlopt opt, PRN *prn);
Run an auxiliary regression to test pmod for non-linearity,
via the addition of either squares or logs of the original
indepdendent variables.
pmod : |
pointer to original model. |
pZ : |
pointer to data array. |
pdinfo : |
information on the data set. |
aux_code : |
AUX_SQ for squares or AUX_LOG for logs
|
opt : |
if contains OPT_S, save test results to model.
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int reset_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn);
Carries out Ramsey's RESET test for model specification.
pmod : |
pointer to model to be tested. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
opt : |
if contains OPT_S, save test results to model.
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int autocorr_test (MODEL *pmod, int order, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn);
Tests the given model for autocorrelation of order equal to
the specified value, or equal to the frequency of the data if
the supplied order is zero. Gives TR^2 and LMF test statistics.
pmod : |
pointer to model to be tested. |
order : |
lag order for test. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
opt : |
if flags include OPT_S, save test results to model;
if OPT_Q, be less verbose.
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int chow_test (const char *line,
MODEL *pmod,
double ***pZ,
DATAINFO *pdinfo,
gretlopt opt,
PRN *prn);
Tests the given model for structural stability (Chow test).
line : |
command line for parsing. |
pmod : |
pointer to model to be tested. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
opt : |
if flags include OPT_S, save test results to model.
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int cusum_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn);
Tests the given model for parameter stability via the CUSUM test,
or if opt includes OPT_R, via the CUSUMSQ test.
pmod : |
pointer to model to be tested. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
opt : |
if flags include OPT_S, save results of test to model.
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int panel_hausman_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn);
Tests the given pooled model for fixed and random effects.
pmod : |
pointer to model to be tested. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
opt : |
option flags. |
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int vif_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, PRN *prn);
Calculates and displays the Variance Inflation Factors for the independent variables in the given model.
pmod : |
pointer to model to be tested. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int leverage_test (MODEL *pmod, double ***pZ, DATAINFO *pdinfo, gretlopt opt, PRN *prn);
Tests the data used in the given model for points with high leverage and influence on the estimates.
pmod : |
pointer to model to be tested. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
opt : |
if OPT_S, add calculated series to data set.
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
int add_leverage_values_to_dataset (double ***pZ,
DATAINFO *pdinfo,
gretl_matrix *m,
unsigned char flags);
Adds to the working dataset one or more series calculated by the gretl test for leverage/influence of data points.
pZ : |
pointer to data array. |
pdinfo : |
dataset information. |
m : |
matrix containing leverage values. |
flags : |
option flags: combination of SAVE_LEVERAGE, SAVE_INFLUENCE,
and SAVE_DFFITS.
|
| Returns : | 0 on successful completion, error code on error. |
int lmtest_driver (const char *param,
double ***pZ,
DATAINFO *pdinfo,
gretlopt opt,
PRN *prn);
Performs some subset of gretl's "lmtest" tests on the
model last estimated, and prints the results to prn.
param : |
auxiliary parameter for some uses. |
pZ : |
pointer to data matrix. |
pdinfo : |
information on the data set. |
opt : |
controls which test(s) will be performed; OPT_Q
gives less verbose results.
|
prn : |
gretl printing struct. |
| Returns : | 0 on successful completion, error code on error. |
| << describe | gretl_restrict >> |