Top |
int | spearman_rho () |
gretl_matrix * | spearman_rho_func () |
int | kendall_tau () |
gretl_matrix * | kendall_tau_func () |
double | lockes_test () |
double | vge_gamma_test () |
int | runs_test () |
int | diff_test () |
int | sort_pairs_by_x () |
gretl_matrix * | loess_fit () |
double | kernel_bandwidth () |
Includes various nonparametric tests: rank correlation, runs (randomness), and differences between series. Also "loess" regression a la William Cleveland.
int spearman_rho (const int *list
,const DATASET *dset
,gretlopt opt
,PRN *prn
);
Calculates and prints Spearman's rank correlation coefficient for the two
variables specified in the list
.
list |
list of (two) variables to process. |
|
dset |
dataset struct. |
|
opt |
if includes |
|
prn |
gretl printing struct. |
gretl_matrix * spearman_rho_func (const double *x
,const double *y
,int n
,int *err
);
int kendall_tau (const int *list
,const DATASET *dset
,gretlopt opt
,PRN *prn
);
Calculates and prints Kendall's rank correlation tau statistic for
the two variables specified in list
.
list |
list of (two) variables to process. |
|
dset |
dataset struct. |
|
opt |
if includes |
|
prn |
gretl printing struct. |
gretl_matrix * kendall_tau_func (const double *x
,const double *y
,int n
,int *err
);
double lockes_test (const double *x
,int t1
,int t2
,int *err
);
Performs Charles Locke's nonparametric test for whether an
empirical distribution (namely, that of x
over the range
t1
to t2
) is gamma. See C. Locke, "A Test for the Composite
Hypothesis that a Population has a Gamma Distribution,"
Commun. Statis.-Theor. Meth. A5(4), 351-364 (1976). Also
see Shapiro and Chen, Journal of Quality Technology 33(1),
Jan 2001.
double vge_gamma_test (const double *x
,int t1
,int t2
,int *err
);
Performs the test described by J. A. Villaseñor and E. González-Estrada
(Statistics and Probability Letters, 96 (2015) pp. 281–286) for the null
hypothesis that x
is gamma-distributed over the range t1
to t2
.
For the sake of compatibility with the gamma_test()
function in the R
package named "goft" we divide by n-1 in computing the covariance
term sxz
, although this is not recommended by the authors of the above-
noted publication.
int runs_test (int v
,const DATASET *dset
,gretlopt opt
,PRN *prn
);
Performs, and prints the results of, the runs test for randomness
for the variable specified by v
. The normal approximation
is that given in Gary Smith, Statistical Reasoning, 2e, p. 674.
int diff_test (const int *list
,const DATASET *dset
,gretlopt opt
,PRN *prn
);
Performs, and prints the results of, a non-parametric
test for a difference between two variables or groups.
The specific test performed depends on opt
.
int sort_pairs_by_x (gretl_matrix *x
,gretl_matrix *y
,int **order
,char **labels
);
Orders the elements of x
and y
by increasing value
of x
. Optionally, returns in order
an array of
integers representing the order in which the original
observations appear in the sorted vectors. Also
optionally sorts an accomanying array of observation
labels.
gretl_matrix * loess_fit (const gretl_matrix *x
,const gretl_matrix *y
,int d
,double q
,gretlopt opt
,int *err
);
Computes loess estimates based on William Cleveland, "Robust Locally
Weighted Regression and Smoothing Scatterplots", Journal of the
American Statistical Association, Vol. 74 (1979), pp. 829-836.
Typically one expects that d
= 1 and q
is in the neighborhood
of 0.5.
The x,y pairs must be pre-sorted by increasing value of x
; an
error is flagged if this is not the case. See also
sort_pairs_by_x()
.
x |
x-axis variable (must be pre-sorted). |
|
y |
response variable. |
|
d |
order for polynomial fit (0 <= d <= 2). |
|
q |
bandwidth (0 < q <= 1). |
|
opt |
give |
|
err |
location to receive error code. |