Hi everybody,
related to the revived discussion about
https://sourceforge.net/p/gretl/feature-requests/221/, I was doing some
grepping and looking around in the source, to see how the existing
implementations for "meantest" and "vartest" work with a dummy
specification, and how it could be copied to "difftest".
One thing that puzzled me a little was this:
In lib/src/describe.c, there's the function
<C>
static int split_by_var (const DATASET *dset)
{
const char *vname = get_optval_string(MEANTEST, OPT_D);
return current_series_index(dset, vname);
}
</C>
so the value MEANTEST is hardcoded and fixed in there.
However, AFAICS this function is also called from vars_test(), where of
course the command context should be VARTEST instead of MEANTEST, no?
Is this OK? -- Actually, running the following test makes me think that
it is a serious bug instead, so be careful:
<hansl>
open AWM
vartest EER --split-by=D1 # crasher!
</hansl>
I'm also seeing that the documentation of the "vartest" hansl function
has some examples involving "meantest" instead, maybe another indication
that things were left in a kind of dangling state back then.
cheers
sven