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...
...
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.
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.
Some of this was discussed some years ago:
https://gretlml.univpm.it/hyperkitty/list/gretl-devel@gretlml.univpm.it/t...
- 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
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
cheers
sven