| Libgretl Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
int default_lag_order (const DATAINFO *pdinfo); int is_standard_lag (int v, const DATAINFO *pdinfo, int *parent); int is_standard_diff (int v, const DATAINFO *pdinfo, int *parent); int is_dummy_child (int v, const DATAINFO *pdinfo, int *parent); int diffgenr (int v, int ci, double ***pZ, DATAINFO *pdinfo); int laggenr (int v, int lag, double ***pZ, DATAINFO *pdinfo); int loggenr (int v, double ***pZ, DATAINFO *pdinfo); int invgenr (int v, double ***pZ, DATAINFO *pdinfo); int xpxgenr (int vi, int vj, double ***pZ, DATAINFO *pdinfo); int list_diffgenr (int *list, int ci, double ***pZ, DATAINFO *pdinfo); int list_orthdev (int *list, double ***pZ, DATAINFO *pdinfo); int list_laggenr (int **plist, int order, double ***pZ, DATAINFO *pdinfo); int * laggenr_from_to (int v, int minlag, int maxlag, double ***pZ, DATAINFO *pdinfo, int *err); int list_loggenr (int *list, double ***pZ, DATAINFO *pdinfo); int list_xpxgenr (int **plist, double ***pZ, DATAINFO *pdinfo, gretlopt opt); int list_dumgenr (int **plist, double ***pZ, DATAINFO *pdinfo, gretlopt opt); int dumgenr_with_oddval (int **plist, double ***pZ, DATAINFO *pdinfo, double oddval); int list_makediscrete (const int *list, DATAINFO *pdinfo, gretlopt opt); int gettrend (double ***pZ, DATAINFO *pdinfo, int square); void gretl_transforms_cleanup (void);
int default_lag_order (const DATAINFO *pdinfo);
pdinfo : |
data information struct. |
| Returns : | the default lag order for generating lags, performing autocorrelation test, and so on. |
int is_standard_lag (int v,
const DATAINFO *pdinfo,
int *parent);
v : |
|
pdinfo : |
|
parent : |
|
| Returns : |
int is_standard_diff (int v,
const DATAINFO *pdinfo,
int *parent);
v : |
|
pdinfo : |
|
parent : |
|
| Returns : |
int is_dummy_child (int v,
const DATAINFO *pdinfo,
int *parent);
v : |
|
pdinfo : |
|
parent : |
|
| Returns : |
int diffgenr (int v,
int ci,
double ***pZ,
DATAINFO *pdinfo);
Creates the first difference (or log- or seasonal difference,
depending on the value of ci) of variable v, if the
differenced variable does not already exist.
v : |
ID number in dataset of source variable. |
ci : |
DIFF (first difference), LDIFF (log difference) or SDIFF
(seasonal difference).
|
pZ : |
pointer to data array. |
pdinfo : |
information on dataset. |
| Returns : | the ID number of the differenced variable, or -1 on error. |
int laggenr (int v,
int lag,
double ***pZ,
DATAINFO *pdinfo);
Creates the specified lag of variable v if this variable does
not already exist.
v : |
ID number in dataset of source variable. |
lag : |
the order of the lag to create. |
pZ : |
pointer to data array. |
pdinfo : |
information on dataset. |
| Returns : | the ID number of the lagged variable, or -1 on error. |
int loggenr (int v,
double ***pZ,
DATAINFO *pdinfo);
Creates the natural log of variable v if this variable does
not already exist.
v : |
ID number in dataset of source variable. |
pZ : |
pointer to data array. |
pdinfo : |
information on dataset. |
| Returns : | the ID number of the log variable, or -1 on error. |
int invgenr (int v,
double ***pZ,
DATAINFO *pdinfo);
Creates the reciprocal of variable v if this variable does
not already exist.
v : |
ID number in dataset of source variable. |
pZ : |
pointer to data array. |
pdinfo : |
information on dataset. |
| Returns : | the ID number of the reciprocal, or -1 on error. |
int xpxgenr (int vi,
int vj,
double ***pZ,
DATAINFO *pdinfo);
Creates the cross product of variables vi and vj if this
variable does not already exist.
vi : |
ID number in dataset of first source variable. |
vj : |
ID number in dataset of second source variable. |
pZ : |
pointer to data array. |
pdinfo : |
information on dataset. |
| Returns : | the ID number of the cross-product variable, or -1 on error. |
int list_diffgenr (int *list,
int ci,
double ***pZ,
DATAINFO *pdinfo);
Generate differences of the variables in list, and add them
to the data set. If ci is DIFF these are ordinary first
differences; if ci is LDIFF they are log differences; and
if ci is SDIFF they are seasonal differences.
list : |
on entry, list of variables to process; on exit, ID numbers of the generated variables. |
ci : |
must be DIFF, LDIFF or SDIFF.
|
pZ : |
pointer to data matrix. |
pdinfo : |
data information struct. |
| Returns : | 0 on successful completion, 1 on error. |
int list_orthdev (int *list,
double ***pZ,
DATAINFO *pdinfo);
Generate orthogonal deviations of the variables in list, and add
them to the data set.
list : |
list of variables to process. |
pZ : |
pointer to data matrix. |
pdinfo : |
data information struct. |
| Returns : | 0 on success, error code on error. |
int list_laggenr (int **plist,
int order,
double ***pZ,
DATAINFO *pdinfo);
Generates and adds to the data set order lagged values of the
variables given in the list pointed to by plist.
plist : |
on entry, pointer to list of variables to process. On exit the list holds the ID numbers of the lag variables. |
order : |
number of lags to generate (or 0 for automatic). |
pZ : |
pointer to data array. |
pdinfo : |
data information struct. |
| Returns : | 0 on successful completion, 1 on error. |
int * laggenr_from_to (int v,
int minlag,
int maxlag,
double ***pZ,
DATAINFO *pdinfo,
int *err);
Creates the specified lags of variable v if they do not
already exist.
v : |
ID number in dataset of source variable. |
minlag : |
minimum lag order. |
maxlag : |
maximum lag order. |
pZ : |
pointer to data array. |
pdinfo : |
information on dataset. |
err : |
location to receive error code. |
| Returns : | list of lag variables, or NULL or on error.
|
int list_loggenr (int *list,
double ***pZ,
DATAINFO *pdinfo);
Generates and adds to the data set the natural logs of the
variables given in list.
list : |
on entry, list of variables to process; on exit, holds the ID numbers of the generated variables. |
pZ : |
pointer to data array. |
pdinfo : |
data information struct. |
| Returns : | 0 on success, error code on error. |
int list_xpxgenr (int **plist,
double ***pZ,
DATAINFO *pdinfo,
gretlopt opt);
Generates and adds to the data set squares and (if opt is OPT_O)
cross-products of the variables given in the list pointed to
by plist.
plist : |
pointer to list of variables to process. On exit the list holds the ID numbers of the squares (and possibly cross-products). |
pZ : |
pointer to data matrix. |
pdinfo : |
data information struct. |
opt : |
If OPT_O, both squares and cross-products are generated, otherwise only squares. |
| Returns : | 0 on success, error code on error. |
int list_dumgenr (int **plist,
double ***pZ,
DATAINFO *pdinfo,
gretlopt opt);
For each of the variables given in the list to which plist
points, generates and adds to the data set k dummy variables
coding for the k distinct values of the variable in question.
All these variables must have already been marked as discrete.
If the OPT_F or OPT_L option is given, either the first or
the last value of each variable is taken as the "base" and is
not given a dummy encoding (that is, only k - 1 dummies are
added for each variable).
plist : |
pointer to list of variables to process; on exit the list holds the ID numbers of the generated dummies. |
pZ : |
pointer to data matrix. |
pdinfo : |
data information struct. |
opt : |
can be OPT_F to drop the first value, OPT_L to drop
the last, or OPT_NONE.
|
| Returns : | 0 on success, error code on error. |
int dumgenr_with_oddval (int **plist,
double ***pZ,
DATAINFO *pdinfo,
double oddval);
For each of the variables given in the list to which plist
points, generates and adds to the data set k dummy variables
coding for the k distinct values of the variable in question.
All these variables must have already been marked as discrete.
if oddval is not NADBL, it is treated as the omitted
category and only k - 1 dummies are added for each variable).
plist : |
pointer to list of variables to process; on exit the list holds the ID numbers of the generated dummies. |
pZ : |
pointer to data matrix. |
pdinfo : |
data information struct. |
oddval : |
value which should be skipped when encoding the input values as dummies. |
| Returns : | 0 on success, error code on error. |
int list_makediscrete (const int *list,
DATAINFO *pdinfo,
gretlopt opt);
Sets the variables given in list as discrete, unless
opt is OPT_R, in which case the variables are set as
continuous.
list : |
list of variables to process. |
pdinfo : |
data information struct. |
opt : |
if OPT_R, reverse the operation.
|
| Returns : | 0 on success, error code on error. |
int gettrend (double ***pZ,
DATAINFO *pdinfo,
int square);
pZ : |
|
pdinfo : |
|
square : |
|
| Returns : |