[Rd] summary.table parameter bug (PR#2514)
rreeve@liposcience.com
rreeve@liposcience.com
Fri Jan 31 23:00:04 2003
summary.table has a bug in the parameter line. It currently gives
df = (K1 - 1) * (K2 - 1) * .. * (Kp - 1) (1)
where Ki is the number of categories of variable i. The documentation and the expected counts say that the test is for independence among the variables (equivalent to a loglinear model [1][2]...[p]). So equation (1) is incorrect for this hypothesis, except for 2-way tables. The df line should be
parameter <- prod(sapply(m, length)) - (sum(sapply(m, length) - 1) + 1)
Running Version 1.5-0, 2002-04-28 for Windows.
Russell Reeve, Ph.D.
Dir of Experimental Design, Analysis, and Quality
rreeve@liposcience.com
(919) 256-1300