[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
anovadata = ([[1,'A1','B1',2],
              [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]])

y=scipy.stats.anova(anovadata)


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 ?
    y=scipy.stats.anova(anovadata)
  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

=====
When I consider your heavens, the work of your fingers,
the moon and the stars, which you have set in place,
what is man that you are mindful of him, the son of man that you care for him?    Psalm 8:3-4
Y!M, AOL, jabber.com: lluang

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/



More information about the SciPy-user mailing list