# [SciPy-user] stats.anova problem

Louis Luangkesorn lluang at yahoo.com
Sun Jan 20 00:59:45 CST 2002

Hello

I'm trying to test the anova package.  But I'm doing something
wrong here.  This is what I try.

import scipy
[2,'A1','B1',1],
[3,'A1','B1',3],
[4,'A1','B1',2],
[5,'A1','B2',3],
[6,'A1','B2',4],
[7,'A1','B2',5],
[8,'A2','B1',4],
[9,'A2','B1',6],
[10,'A2','B1',5],
[11,'A1','B2',2],
[12,'A1','B2',4],
[13,'A1','B2',5]])

Then, I get:

Traceback (most recent call last):
File "C:\apps\Python\Pythonwin\pywin\framework\scriptutils.py",
line 301, in RunScript
exec codeObject in __main__.__dict__
File "C:\Documents and Settings\kll560\My
Documents\testdata\anovatest.py", line 16, in ?
File "C:\apps\Python\scipy\stats\stats.py", line 234, in __call__
return apply(self._dispatch[type(arg1)], (arg1,) + args, kw)
File "C:\apps\Python\scipy\stats\stats.py", line 3933, in aanova
M = pstat.collapse(data,Bscols,-1,None,None,mean)
TypeError: collapse() takes at most 5 arguments (6 given)

By the way, in pstats.py, the call for collapse() is in line 183:

def collapse
(listoflists,keepcols,collapsecols,sterr=None,ns=None):

Any ideas?

Louis

=====