On Wed, 10 Jan 2018, Sven Schreiber wrote:
Am 09.01.2018 um 21:44 schrieb Allin Cottrell:
> On Fri, 5 Jan 2018, A. T. wrote:
>> 1) accessor for p-values and test-statistics; in my case, for instance,
>> I just need information about Pearson's chi^2-test.
>> 2) --silent option
>>
>> Is there a way to access these statistics somehow?
>
> Not at present. And given that the "xtab" command accepts lists for both
Hm, BTW more warning messages might be useful:
<hansl>
open credscore.gdt
list x = Acc Age # Acc is binary, Age is positive integers
xtab MDR x # w/o comment only reports the combination MDR vs. Acc
discrete Age # necessary because Age has many values
xtab MDR x # reports both combinations
</hansl>
OK, in git you now get notified if an "xtab" argument is dropped as
non-discrete.
> x and y arguments it's not obvious that it could be easily
arranged.
I guess it could be as symmetric matrices, similar to the arrangement of a
covariance matrix. The diagonal could be left empty or the p-values there
could be set to 0. ($test and $pvalue are already sometimes matrices as per
the doc.)
> guess we could offer a --silent option and storage of (Pearson) $test and
> $pvalue conditional on getting just one x and y.
'--silent' sounds good.
While we're at it, getting the Fisher test results (if applicable, 2x2
crosstab) would also be nice. I guess this could really be made conditional
on just a single x and y variable.
My feeling is that the above is getting too complicated. For now,
here's what we have (git/snapshots):
* In the simple bivariate case (only) $test and $pvalue are available
for the Pearson chi-square test and its p-value -- provided the
minimum expected value condition is met. The Fisher test is sui
generis (we print 3 p-values but no test statistic); I think that if
there's a demand for that we might add a function to do it.
* There's now a --quiet option (which really only makes sense in the
bivariate case).
(We offer --silent only if --quiet is not silent, but in this case I
don't think there's any need for degrees of quietness.)
I've also fixed a long-standing issue that apparently hasn't been
noticed: if you give the --matrix=name option to xtab we were
insisting on a list argument, which was then ignored. So far as I can
see there's no call for a list arg in the --matrix case, so I've
dropped the requirement (and giving a list will now provoke an error).
Allin