Hi Sven,
Thanks for your reply.
Am 05.12.24 um 16:05 schrieb Sven Schreiber:
Am 05.12.2024 um 15:17 schrieb Artur T.:
> I have a question on the meantest command: ...
>
> It's not clear to me whether this command refers to the version for
> paired or unpaired samples. Here is some more background information:
>
>
https://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/
> t_test.htm
> ...
> Given that the meantest command returns a different test statistics
> and p-value, I assume the meantest covers the unpaired sample case. If
> so, this should be mentioned in the help.
I also think it's the unpaired case (see below for more). Yes, it
probably should be mentioned more explicitly. Actually, it doesn't feel
very natural to have two series in the same dataset, so the observations
(rows) are linked, but at the same time they are then interpreted as
unpaired. But OK, I guess you can construct examples where it still
makes sense.
Thanks for your confirmation. I created an internal ticket for improving
the help.
On your 2nd point: I think I know what you mean, but I also think that
should not be changed anymore. Given that the difftest works the same
(for tests on paired and unpaired samples), at least it is consistent.
> Also, do you think it's worth to create a package out of my
code?
Not really. If two series x and y are paired, then all you have to do to
test the differences is, well, calculate the difference! So just form
d=x-y and continue from there, e.g. simply by running 'ols d const'. But
yes, all this should be better explained somewhere.
Yes, I know it can be simply done. However, it feels as the meantest
command is incomplete. I see two options here:
1) add support for the paired case to meantest
2) Add a brief example to the help on how to conduct the test (just saw
that you mentioned this before, too)
Some of this was discussed some years ago:
https://gretlml.univpm.it/
hyperkitty/list/gretl-devel(a)gretlml.univpm.it/thread/
N2GLG75NVXSFUAOCWFDEIXLGXAWITEHE/#ZLZ4GLKKUKC6DXJMYNUJ4M52LJ2GEYOD - and
that's also what prompted me to write the Friedman.gfn package back then.
>
> Let me add another point. Currently, we have the following packages:
>
> - Friedman.gfn
> - KruskalWallis.gfn
Actually, there is a 3rd package by Yi-Nung Yang named "mwu" for
conducting the "Mann-Whitney U test with group dummy variable".
> Just for completeness, apart from the meantest command, there is
also
> the difftest command:
> ...
> All variations are general tests on central tendency
Yes; 'difftest' is nonparametric stuff, and 'meantest' is parametric/
simple t-test.
>
> Having a common "access point" may be useful as the current state is
> somehow confusing. What do you guys think about a new package
> combining at least the user-contributed packages "Friedman",
> "KruskalWallis" and optionally my test for the paired t-test?
For the paired t-test, see above - I think only better documentation is
needed for that. That would leave only the two contributed packages. To
be honest, I'm skeptical that it's worth the effort, they are quite
specialized.
However, I agree it's easy to get confused there. I believe the
'meantest' command is very old and doesn't do much by today's standards.
And the names 'meantest' and 'difftest' do not contain hints about the
(non-) parametric nature. Perhaps one idea might be to subsume the t-
test (meantest) as another option under 'difftest'. Example:
meantest x y --unequal-vars # current syntax
difftest x y --t-test --unequal-vars # possible new syntax
Yes, I agree that putting both parametric and non-parametric tests under
the hood of the difftest command sounds reasonable.
Artur