A few years ago, Keith Smillie published an excellent statistics package
that he wrote using J:
Keith's J page
http://www.cs.ualberta.ca/~smillie/Jpage/Jpage.html
Tutorial Paper
http://www.cs.ualberta.ca/~smillie/Jpage/jtsp.pdf
J Executable Tutorial
http://www.cs.ualberta.ca/~smillie/Jpage/jtsp.ijs
Just the Statistics Package
http://www.cs.ualberta.ca/~smillie/Jpage/jsp.ijs
The tutorial is quite good, and the included statistics package is
particularly useful for university-level statistics courses, and it is
much less costly (free) than SPSS ($1200), which is the standard
statistics package for many graduate-courses.
However, the J code was written for J 4.06, so there are some
incompatbilities in the code with the latest versions of J. The x-dot
to x conversion was obvious, and after I did a global find-and-replace
for both x-dot and y-dot, most of the code worked. However, some of the
more complex functions such as the ANOVA verbs still had problems,
Here is Keith's ANOVA verb:
NB. Analysis of variance
wsqs=: ([: *:+/) % #
aov1=: 3 : 0
D=. y.
DFerr=. (DFtot=. <:#;D) - DFtr=. <:#D
SStr=. (+/ wsqs EACH D) - CT=. wsqs ;D
SStot=. (+/ *: ;D) - CT
SSerr=. SStot - SStr
'MStr MSerr'=. (SStr,SSerr) % DFtr,DFerr
F=. MStr%MSerr
r1=. 'Treatments', 5.0 12.5 12.5 8.1":DFtr,SStr,MStr,F
r2=. 'Error ', (5.0 12.5 12.5":DFerr,SSerr,MSerr),8$' '
r3=. 'Total ', (5.0 12.5":DFtot,SStot),20$' '
r1,r2,:r3
)
Gettting rid of the dot in y-dot got part of the way through the
problems:
NB. Analysis of variance
wsqs=: ([: *:+/) % #
aov1=: 3 : 0
D=. y
DFerr=. (DFtot=. <:#;D) - DFtr=. <:#D
SStr=. (+/ wsqs EACH D) - CT=. wsqs ;D
SStot=. (+/ *: ;D) - CT
SSerr=. SStot - SStr
'MStr MSerr'=. (SStr,SSerr) % DFtr,DFerr
F=. MStr%MSerr
r1=. 'Treatments', 5.0 12.5 12.5 8.1":DFtr,SStr,MStr,F
r2=. 'Error ', (5.0 12.5 12.5":DFerr,SSerr,MSerr),8$' '
r3=. 'Total ', (5.0 12.5":DFtot,SStot),20$' '
r1,r2,:r3
But the problen now was in the formatting lines r1, r2, and r3. What
needs to be done to fix this, and the other similar functions that use
the old formatting scheme?
Skip
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm