describe

describe —

Synopsis

typedef             Summary;
typedef             FreqDist;
typedef             Xtab;
typedef             MahalDist;
int                 eval_ytest                          (double y,
                                                         GretlOp op,
                                                         double test);
int                 gretl_minmax                        (int t1,
                                                         int t2,
                                                         const double *x,
                                                         double *min,
                                                         double *max);
double              gretl_min                           (int t1,
                                                         int t2,
                                                         const double *x);
double              gretl_max                           (int t1,
                                                         int t2,
                                                         const double *x);
double              gretl_sum                           (int t1,
                                                         int t2,
                                                         const double *x);
double              gretl_mean                          (int t1,
                                                         int t2,
                                                         const double *x);
double              gretl_restricted_mean               (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         GretlOp yop,
                                                         double yval);
double              gretl_quantile                      (int t1,
                                                         int t2,
                                                         const double *x,
                                                         double p,
                                                         int *err);
int                 gretl_array_quantiles               (double *a,
                                                         int n,
                                                         double *p,
                                                         int k);
double              gretl_array_quantile                (double *a,
                                                         int n,
                                                         double p);
double              gretl_median                        (int t1,
                                                         int t2,
                                                         const double *x);
double              gretl_sst                           (int t1,
                                                         int t2,
                                                         const double *x);
double              gretl_variance                      (int t1,
                                                         int t2,
                                                         const double *x);
double              gretl_restricted_variance           (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         GretlOp yop,
                                                         double yval);
double              gretl_stddev                        (int t1,
                                                         int t2,
                                                         const double *x);
double              gretl_restricted_stddev             (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         GretlOp yop,
                                                         double yval);
double              gretl_long_run_variance             (int t1,
                                                         int t2,
                                                         const double *x,
                                                         int m);
double              gretl_covar                         (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         int *missing);
double              gretl_corr                          (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         int *missing);
double              gretl_corr_rsq                      (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y);
int                 gretl_moments                       (int t1,
                                                         int t2,
                                                         const double *x,
                                                         double *xbar,
                                                         double *sd,
                                                         double *skew,
                                                         double *kurt,
                                                         int k);
void                free_freq                           (FreqDist *freq);
int                 freq_setup                          (int v,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         int *pn,
                                                         double *pxmax,
                                                         double *pxmin,
                                                         int *nbins,
                                                         double *binwidth);
FreqDist *          get_freq                            (int varno,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         double fmin,
                                                         double fwid,
                                                         int nbins,
                                                         int params,
                                                         gretlopt opt,
                                                         int *err);
FreqDist *          get_discrete_freq                   (int v,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         int *err);
int                 freqdist                            (int varno,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         int graph,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 crosstab                            (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 crosstab_from_matrix                (gretlopt opt,
                                                         PRN *prn);
int                 compare_xtab_rows                   (const void *a,
                                                         const void *b);
Xtab *              single_crosstab                     (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn,
                                                         int *err);
gretl_matrix *      xtab_to_matrix                      (const Xtab *tab);
void                free_xtab                           (Xtab *tab);
int                 model_error_dist                    (const MODEL *pmod,
                                                         double ***pZ,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 auto_acf_order                      (int pd,
                                                         int nobs);
int                 auto_spectrum_order                 (int T,
                                                         gretlopt opt);
int                 corrgram                            (int varno,
                                                         int order,
                                                         int nparam,
                                                         const double **Z,
                                                         DATAINFO *pdinfo,
                                                         PRN *prn,
                                                         gretlopt opt);
int                 xcorrgram                           (const int *list,
                                                         int order,
                                                         const double **Z,
                                                         DATAINFO *pdinfo,
                                                         PRN *prn,
                                                         gretlopt opt);
int                 periodogram                         (int varno,
                                                         int width,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
gretl_matrix *      periodogram_func                    (const double *x,
                                                         const DATAINFO *pdinfo,
                                                         int width,
                                                         int *err);
Summary *           get_summary                         (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn,
                                                         int *err);
int                 list_summary                        (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
void                print_summary                       (const Summary *summ,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);
void                free_summary                        (Summary *summ);
VMatrix *           corrlist                            (int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         int *err);
VMatrix *           vmatrix_new                         (void);
void                free_vmatrix                        (VMatrix *vmat);
int                 gretl_corrmx                        (int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 means_test                          (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 vars_test                           (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);
void                print_corrmat                       (VMatrix *corr,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);
double              dh_root_b1_to_z1                    (double rb1,
                                                         double n);
double              dh_b2_to_z2                         (double b1,
                                                         double b2,
                                                         double n);
double              doornik_chisq                       (double skew,
                                                         double xkurt,
                                                         int n);
int                 multivariate_normality_test         (const gretl_matrix *E,
                                                         const gretl_matrix *Sigma,
                                                         PRN *prn);
int                 mahalanobis_distance                (const int *list,
                                                         double ***pZ,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
MahalDist *         get_mahal_distances                 (const int *list,
                                                         double ***pZ,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn,
                                                         int *err);
void                free_mahal_dist                     (MahalDist *md);
const double *      mahal_dist_get_distances            (const MahalDist *md);
int                 mahal_dist_get_n                    (const MahalDist *md);
const int *         mahal_dist_get_varlist              (const MahalDist *md);
double              gretl_gini                          (int t1,
                                                         int t2,
                                                         const double *x);
int                 gini                                (int vnum,
                                                         const double **Z,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
int                 shapiro_wilk                        (const double *x,
                                                         int t1,
                                                         int t2,
                                                         double *W,
                                                         double *pval);
int                 gretl_normality_test                (const char *param,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);
gretl_matrix *      acf_vec                             (const double *x,
                                                         int order,
                                                         const DATAINFO *pdinfo,
                                                         int n,
                                                         int *err);
gretl_matrix *      xcf_vec                             (const double *x,
                                                         const double *y,
                                                         int p,
                                                         const DATAINFO *pdinfo,
                                                         int n,
                                                         int *err);
double              ljung_box                           (int m,
                                                         int t1,
                                                         int t2,
                                                         const double *y,
                                                         int *err);

Description

Details

Summary

typedef struct Summary_ Summary;


FreqDist

typedef struct FreqDist_ FreqDist;


Xtab

typedef struct Xtab_ Xtab;


MahalDist

typedef struct MahalDist_ MahalDist;


eval_ytest ()

int                 eval_ytest                          (double y,
                                                         GretlOp op,
                                                         double test);

y : reference value.
op : operator.
test : test value.
Returns : 1 if the expression y yop test (for example "y = 2" or "y <= 45") evaluates as true, else 0.

gretl_minmax ()

int                 gretl_minmax                        (int t1,
                                                         int t2,
                                                         const double *x,
                                                         double *min,
                                                         double *max);

Puts the minimum and maximum values of the series x, from obs t1 to obs t2, into the variables min and max.

t1 : starting observation.
t2 : ending observation.
x : data series.
min : location to receive minimum value.
max : location to receive maximum value.
Returns : the number of valid observations in the given data range.

gretl_min ()

double              gretl_min                           (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the minimum value of x over the given range, or NADBL if no valid vaues are found.

gretl_max ()

double              gretl_max                           (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the maximum value of x over the given range, or NADBL if no valid vaues are found.

gretl_sum ()

double              gretl_sum                           (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the sum of the series x from obs t1 to obs t2, skipping any missing values, or NADBL in case there are no valid observations.

gretl_mean ()

double              gretl_mean                          (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the arithmetic mean of the series x from obs t1 to obs t2, skipping any missing values, or NADBL in case there are no valid observations.

gretl_restricted_mean ()

double              gretl_restricted_mean               (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         GretlOp yop,
                                                         double yval);

t1 : starting observation.
t2 : ending observation.
x : data series.
y : criterion series.
yop : criterion operator.
yval : criterion value.
Returns : the arithmetic mean of the series x in the range t1 to t2 (inclusive), but including only observations where the criterion variable y bears the relationship yop to the value yval -- or NADBL in case there are no observations that satisfy the restriction.

gretl_quantile ()

double              gretl_quantile                      (int t1,
                                                         int t2,
                                                         const double *x,
                                                         double p,
                                                         int *err);

t1 : starting observation.
t2 : ending observation.
x : data series.
p : probability.
err : location to receive error code.
Returns : the p quantile of the series x from obs t1 to obs t2, skipping any missing values, or NADBL on failure.

gretl_array_quantiles ()

int                 gretl_array_quantiles               (double *a,
                                                         int n,
                                                         double *p,
                                                         int k);

Computes k quantiles (given by the elements of p) for the first n elements of the array a, which is re-ordered in the process. On successful exit, p contains the quantiles.

a : data array (this gets re-ordered).
n : length of array.
p : array of probabilities (over-written by quantiles).
k : number of probabilities.
Returns : 0 on success, non-zero code on error.

gretl_array_quantile ()

double              gretl_array_quantile                (double *a,
                                                         int n,
                                                         double p);

a : array on which to operate.
n : number of elements in a.
p : probability.
Returns : the p quantile of the first n elements in a, which is re-ordered in the process, or NADBL on failure.

gretl_median ()

double              gretl_median                        (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the median value of the series x from obs t1 to obs t2, skipping any missing values, or NADBL on failure.

gretl_sst ()

double              gretl_sst                           (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the sum of squared deviations from the mean for the series x from obs t1 to obs t2, skipping any missing values, or NADBL on failure.

gretl_variance ()

double              gretl_variance                      (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the variance of the series x from obs t1 to obs t2, skipping any missing values, or NADBL on failure.

gretl_restricted_variance ()

double              gretl_restricted_variance           (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         GretlOp yop,
                                                         double yval);

t1 : starting observation.
t2 : ending observation.
x : data series.
y : criterion series.
yop : criterion operator.
yval : criterion value.
Returns : the variance of the series x from obs t1 to obs t2, skipping any missing values and observations where the series y does not bear the relationship yop to the value yval, or NADBL on failure.

gretl_stddev ()

double              gretl_stddev                        (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the standard deviation of the series x from obs t1 to obs t2, skipping any missing values, or NADBL on failure.

gretl_restricted_stddev ()

double              gretl_restricted_stddev             (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         GretlOp yop,
                                                         double yval);

t1 : starting observation.
t2 : ending observation.
x : data series.
y : criterion series.
yop : criterion operator.
yval : criterion value.
Returns : the standard deviation of the series x from obs t1 to obs t2, skipping any missing values and observations where the series y does not bear the relationship yop to the value yval, or NADBL on failure.

gretl_long_run_variance ()

double              gretl_long_run_variance             (int t1,
                                                         int t2,
                                                         const double *x,
                                                         int m);

t1 : starting observation.
t2 : ending observation.
x : data series.
m : bandwidth.
Returns : the long-run variance of the series x from obs t1 to obs t2, using Bartlett kernel weights, or NADBL on failure (which includes encountering missing values).

gretl_covar ()

double              gretl_covar                         (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         int *missing);

t1 : starting observation.
t2 : ending observation.
x : data series.
y : data series.
missing : location to receive information on the number of missing observations that were skipped, or NULL.
Returns : the covariance of the series x and y from obs t1 to obs t2, skipping any missing values, or NADBL on failure.

gretl_corr ()

double              gretl_corr                          (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y,
                                                         int *missing);

t1 : starting observation.
t2 : ending observation.
x : data series.
y : data series.
missing : location to receive information on the number of missing observations that were skipped, or NULL.
Returns : the correlation coefficient for the series x and y from obs t1 to obs t2, skipping any missing values, or NADBL on failure.

gretl_corr_rsq ()

double              gretl_corr_rsq                      (int t1,
                                                         int t2,
                                                         const double *x,
                                                         const double *y);

t1 : starting observation.
t2 : ending observation.
x : data series.
y : data series.
Returns : the square of the correlation coefficient for the series x and y from obs t1 to obs t2, skipping any missing values, or NADBL on failure. Used as alternative value for R^2 in a regression without an intercept.

gretl_moments ()

int                 gretl_moments                       (int t1,
                                                         int t2,
                                                         const double *x,
                                                         double *xbar,
                                                         double *sd,
                                                         double *skew,
                                                         double *kurt,
                                                         int k);

Calculates sample moments for series x from obs t1 to obs t2.

t1 : starting observation.
t2 : ending observation.
x : data series.
xbar : pointer to receive mean.
sd : pointer to receive standard deviation.
skew : pointer to receive skewness.
kurt : pointer to receive excess kurtosis.
k : degrees of freedom loss (generally 1).
Returns : 0 on success, 1 on error.

free_freq ()

void                free_freq                           (FreqDist *freq);

Frees all malloced elements of the struct.

freq : gretl frequency distribution struct

freq_setup ()

int                 freq_setup                          (int v,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         int *pn,
                                                         double *pxmax,
                                                         double *pxmin,
                                                         int *nbins,
                                                         double *binwidth);

v :
Z :
pdinfo :
pn :
pxmax :
pxmin :
nbins :
binwidth :
Returns :

get_freq ()

FreqDist *          get_freq                            (int varno,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         double fmin,
                                                         double fwid,
                                                         int nbins,
                                                         int params,
                                                         gretlopt opt,
                                                         int *err);

Calculates the frequency distribution for the specified variable.

varno : ID number of variable to process.
Z : data array.
pdinfo : information on the data set.
fmin : lower limit of left-most bin (or NADBL for automatic).
fwid : bin width (or NADBL for automatic).
nbins : number of bins to use (or 0 for automatic).
params : degrees of freedom loss (generally = 1 unless we're dealing with the residual from a regression).
opt : if includes OPT_Z, set up for comparison with normal dist; if includes OPT_O, compare with gamma distribution; if includes OPT_Q, do not show a graph; if includes OPT_D, treat the variable as discrete; OPT_X indicates that this function is called as part of a cross-tabulation.
err : location to receive error code.
Returns : pointer to struct containing the distribution.

get_discrete_freq ()

FreqDist *          get_discrete_freq                   (int v,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         int *err);

v :
Z :
pdinfo :
opt :
err :
Returns :

freqdist ()

int                 freqdist                            (int varno,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         int graph,
                                                         gretlopt opt,
                                                         PRN *prn);

varno :
Z :
pdinfo :
graph :
opt :
prn :
Returns :

crosstab ()

int                 crosstab                            (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

list :
Z :
pdinfo :
opt :
prn :
Returns :

crosstab_from_matrix ()

int                 crosstab_from_matrix                (gretlopt opt,
                                                         PRN *prn);

opt :
prn :
Returns :

compare_xtab_rows ()

int                 compare_xtab_rows                   (const void *a,
                                                         const void *b);

a :
b :
Returns :

single_crosstab ()

Xtab *              single_crosstab                     (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn,
                                                         int *err);

list :
Z :
pdinfo :
opt :
prn :
err :
Returns :

xtab_to_matrix ()

gretl_matrix *      xtab_to_matrix                      (const Xtab *tab);

tab :
Returns :

free_xtab ()

void                free_xtab                           (Xtab *tab);

Frees all malloced elements of the struct, and then the pointer itself.

tab : gretl crosstab struct.

model_error_dist ()

int                 model_error_dist                    (const MODEL *pmod,
                                                         double ***pZ,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

pmod :
pZ :
pdinfo :
opt :
prn :
Returns :

auto_acf_order ()

int                 auto_acf_order                      (int pd,
                                                         int nobs);

pd :
nobs :
Returns :

auto_spectrum_order ()

int                 auto_spectrum_order                 (int T,
                                                         gretlopt opt);

T :
opt :
Returns :

corrgram ()

int                 corrgram                            (int varno,
                                                         int order,
                                                         int nparam,
                                                         const double **Z,
                                                         DATAINFO *pdinfo,
                                                         PRN *prn,
                                                         gretlopt opt);

Computes the autocorrelation function and plots the correlogram for the variable specified by varno.

varno : ID number of variable to process.
order : integer order for autocorrelation function.
nparam : number of estimated parameters (e.g. for the case of ARMA), used to correct the degrees of freedom for Q test.
Z : data array.
pdinfo : information on the data set.
prn : gretl printing struct.
opt : if includes OPT_Q, no plot, else if includes OPT_A, use ASCII graphics; if includes OPT_R, variable in question is a model residual generated "on the fly".
Returns : 0 on successful completion, error code on error.

xcorrgram ()

int                 xcorrgram                           (const int *list,
                                                         int order,
                                                         const double **Z,
                                                         DATAINFO *pdinfo,
                                                         PRN *prn,
                                                         gretlopt opt);

Computes the cross-cocorrelation function and plots the cross-correlogram for the specified variables.

list : should contain ID numbers of two variables.
order : integer order for autocorrelation function.
Z : data array.
pdinfo : information on the data set.
prn : gretl printing struct.
opt : if includes OPT_Q, no graphics, else if includes OPT_A, use ASCII graphics.
Returns : 0 on successful completion, error code on error.

periodogram ()

int                 periodogram                         (int varno,
                                                         int width,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

Computes and displays the periodogram for the variable specified by varno.

varno : ID number of variable to process.
width : width of window.
Z : data array.
pdinfo : information on the data set.
opt : if includes OPT_O, use Bartlett lag window for periodogram; if includes OPT_N, don't display gnuplot graph; if includes OPT_R, the variable is a model residual; OPT_L, use log scale.
prn : gretl printing struct.
Returns : 0 on successful completion, error code on error.

periodogram_func ()

gretl_matrix *      periodogram_func                    (const double *x,
                                                         const DATAINFO *pdinfo,
                                                         int width,
                                                         int *err);

x :
pdinfo :
width :
err :
Returns :

get_summary ()

Summary *           get_summary                         (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn,
                                                         int *err);

Calculates descriptive summary statistics for the specified variables.

list : list of variables to process.
Z : data matrix.
pdinfo : information on the data set.
opt : may include OPT_S for "simple" version.
prn : gretl printing struct.
err : location to receive error code.
Returns : struct containing the summary statistics, or NULL on failure.

list_summary ()

int                 list_summary                        (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

list :
Z :
pdinfo :
opt :
prn :
Returns :

print_summary ()

void                print_summary                       (const Summary *summ,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);

Prints the summary statistics for a given variable.

summ : gretl summary statistics struct.
pdinfo : information on the data set.
prn : gretl printing struct.

free_summary ()

void                free_summary                        (Summary *summ);

Frees all malloced elements of the struct.

summ : gretl summary statistics struct

corrlist ()

VMatrix *           corrlist                            (int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         int *err);

Computes pairwise correlation coefficients for the variables specified in list, skipping any constants. If the option flags contain OPT_U, a uniform sample is ensured: only those observations for which all the listed variables have valid values are used. If OPT_C is included, we actually calculate covariances rather than correlations.

list : list of variables to process, by ID number.
Z : data matrix.
pdinfo : data information struct.
opt : option flags.
err : location to receive error code.
Returns : gretl correlation matrix struct, or NULL on failure.

vmatrix_new ()

VMatrix *           vmatrix_new                         (void);

Returns : an allocated and initialized VMatrix, or NULL on failure.

free_vmatrix ()

void                free_vmatrix                        (VMatrix *vmat);

Frees all malloced elements of the struct.

vmat : gretl correlation matrix struct

gretl_corrmx ()

int                 gretl_corrmx                        (int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

Computes and prints the correlation matrix for the specified list of variables.

list : gives the ID numbers of the variables to process.
Z : data array.
pdinfo : data information struct.
opt : option flags: OPT_U = use uniform sample size.
prn : gretl printing struct.
Returns : 0 on successful completion, 1 on error.

means_test ()

int                 means_test                          (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

Carries out test of the null hypothesis that the means of two variables are equal.

list : gives the ID numbers of the variables to compare.
Z : data matrix.
pdinfo : data information struct.
opt : if OPT_O, assume population variances are different.
prn : gretl printing struct.
Returns : 0 on successful completion, error code on error.

vars_test ()

int                 vars_test                           (const int *list,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);

Carries out test of the null hypothesis that the variances of two variables are equal.

list : gives the ID numbers of the variables to compare.
Z : data matrix.
pdinfo : data information struct.
prn : gretl printing struct.
Returns : 0 on successful completion, error code on error.

print_corrmat ()

void                print_corrmat                       (VMatrix *corr,
                                                         const DATAINFO *pdinfo,
                                                         PRN *prn);

Prints a gretl correlation matrix to prn.

corr : gretl correlation matrix.
pdinfo : dataset information.
prn : gretl printing struct.

dh_root_b1_to_z1 ()

double              dh_root_b1_to_z1                    (double rb1,
                                                         double n);

Performs the transformation from skewness, root b1, to the normal score, z1, as set out in Doornik and Hansen, "An Omnibus Test for Normality", 1994. The transformation is originally due to D'Agostino (Biometrika, 1970).

rb1 : square root b1, skewness.
n : number of observations.
Returns : the z1 value.

dh_b2_to_z2 ()

double              dh_b2_to_z2                         (double b1,
                                                         double b2,
                                                         double n);

Performs the transformation from kurtosis, b2, to the normal score, z2, as set out in Doornik and Hansen, "An Omnibus Test for Normality", 1994.

b1 : skewness.
b2 : kurtosis.
n : number of observations.
Returns : the z2 value, or NADBL on failure.

doornik_chisq ()

double              doornik_chisq                       (double skew,
                                                         double xkurt,
                                                         int n);

Calculates the Chi-square test for normality as set out by Doornik and Hansen, "An Omnibus Test for Normality", 1994. This is a modified version of the test proposed by Bowman and Shenton (Biometrika, 1975).

skew : skewness.
xkurt : excess kurtosis.
n : number of observations.
Returns : the Chi-square value, which has 2 degrees of freedom.

multivariate_normality_test ()

int                 multivariate_normality_test         (const gretl_matrix *E,
                                                         const gretl_matrix *Sigma,
                                                         PRN *prn);

E :
Sigma :
prn :
Returns :

mahalanobis_distance ()

int                 mahalanobis_distance                (const int *list,
                                                         double ***pZ,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

list :
pZ :
pdinfo :
opt :
prn :
Returns :

get_mahal_distances ()

MahalDist *         get_mahal_distances                 (const int *list,
                                                         double ***pZ,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn,
                                                         int *err);

list :
pZ :
pdinfo :
opt :
prn :
err :
Returns :

free_mahal_dist ()

void                free_mahal_dist                     (MahalDist *md);

md :

mahal_dist_get_distances ()

const double *      mahal_dist_get_distances            (const MahalDist *md);

md :
Returns :

mahal_dist_get_n ()

int                 mahal_dist_get_n                    (const MahalDist *md);

md :
Returns :

mahal_dist_get_varlist ()

const int *         mahal_dist_get_varlist              (const MahalDist *md);

md :
Returns :

gretl_gini ()

double              gretl_gini                          (int t1,
                                                         int t2,
                                                         const double *x);

t1 : starting observation.
t2 : ending observation.
x : data series.
Returns : the Gini coefficient for the series x from obs t1 to obs t2, skipping any missing values, or NADBL on failure.

gini ()

int                 gini                                (int vnum,
                                                         const double **Z,
                                                         DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

Graphs the Lorenz curve for variable vnum and prints the Gini coefficient.

vnum : ID number of variable to examine.
Z : data array
pdinfo : data information struct.
opt : not used yet.
prn : gretl printing struct.
Returns : 0 on successful completion, error code on error.

shapiro_wilk ()

int                 shapiro_wilk                        (const double *x,
                                                         int t1,
                                                         int t2,
                                                         double *W,
                                                         double *pval);

x : data array.
t1 : starting observation.
t2 : ending observation.
W : location to receive test statistic.
pval : location to receive p-value.
Returns : 0 on success, non-zero on failure.

gretl_normality_test ()

int                 gretl_normality_test                (const char *param,
                                                         const double **Z,
                                                         const DATAINFO *pdinfo,
                                                         gretlopt opt,
                                                         PRN *prn);

param :
Z :
pdinfo :
opt :
prn :
Returns :

acf_vec ()

gretl_matrix *      acf_vec                             (const double *x,
                                                         int order,
                                                         const DATAINFO *pdinfo,
                                                         int n,
                                                         int *err);

Computes the autocorrelation function for series x with maximum lag order.

x : series to analyse.
order : maximum lag for autocorrelation function.
pdinfo : information on the data set, or NULL.
n : length of series (required if pdinfo is NULL).
err : location to receive error code.
Returns : two-column matrix containing the values of the ACF and PACF at the successive lags, or NULL on error.

xcf_vec ()

gretl_matrix *      xcf_vec                             (const double *x,
                                                         const double *y,
                                                         int p,
                                                         const DATAINFO *pdinfo,
                                                         int n,
                                                         int *err);

Computes the cross-correlation function for series x with series y up to maximum lag order.

x : first series.
y : second series.
p : maximum lag for cross-correlation function.
pdinfo : information on the data set, or NULL.
n : length of series (required if pdinfo is NULL).
err : location to receive error code.
Returns : column vector containing the values of the cross-correlation function, or NULL on error.

ljung_box ()

double              ljung_box                           (int m,
                                                         int t1,
                                                         int t2,
                                                         const double *y,
                                                         int *err);

m : maximum lag.
t1 : starting observation.
t2 : ending observation.
y : data series.
err : location to receive erro code.
Returns : the Ljung-Box statistic for lag order m for the series y over the sample t1 to t2, or NADBL on failure.