From Kurt.Hornik@wu-wien.ac.at  Sat Feb  1 15:16:03 2003
From: Kurt.Hornik@wu-wien.ac.at (Kurt Hornik)
Date: Sat Feb  1 15:16:03 2003
Subject: [Rd] summary.table parameter bug (PR#2514)
In-Reply-To: <x2vg05aqk8.fsf@biostat.ku.dk>
References: <Pine.GSO.4.44.0301312158310.4637-100000@auk.stats>
 <x2vg05aqk8.fsf@biostat.ku.dk>
Message-ID: <15931.36474.192487.310068@mithrandir.hornik.net>

>>>>> Peter Dalgaard BSA writes:

> Prof Brian D Ripley <ripley@stats.ox.ac.uk> writes:
>> > parameter <- prod(sapply(m, length)) - (sum(sapply(m, length) - 1) + 1)
>> >
>> > Running Version 1.5-0, 2002-04-28 for Windows.
>> 
>> So that's 4 versions old already. I don't know if this has changed (you
>> don't make it easy for us by providing an example), but I do know that
>> around 170 bugs have been fixed, so please update.
>> 
>> We do expect people to test the latest version before filing a bug report.
>> It takes you less time that it takes the volunteers to process the report.

> In this case reading the code will do and it is still wrong. Not that
> I disagree with Brian's remark in general.

> [I think it has been reported before too, but today is not the day to
> ask people to check the bug repository.]

> I don't feel altogether happy with summary.table generating that test
> in the first place. Tables are not statistical model fits - not
> necessarily, anyway - so something descriptive might be better. 

> Wouldn't it be more obvious anyway to have a separate
> independence.test() (or so) for generating the test of independence?

The reason why summary.table() generates the test is the following:
S-PLUS crosstabs() does so, and chisq.test() can only deal with 2
variables, and people may find it useful to see the test performed.

I have a problem with functions for generating tables (such as table()
or xtabs()) performing a test, but personally I think that summary() can
do so.

[I would object to an independence.test() which does just the above, but
then maybe one could make it a generic with a method for tables doing
the above.]

In any case, will fix the incorrect dofs.

-k



[Rd] summary.table parameter bug (PR#2514)
Kurt Hornik