(twoway-model-additive y) can be used only when y is a list of of c
lists, each list being
a column of r numbers
For example, for a data with 2 rows and 3 columns,
try
(def y (list (list 2 3) (list 4 2 ) (list 8 7)))
2 4 8
3 2 7
(two-way-additive-model y)
++++++
Now
load the rubber's data (Rice's book)
you need to convert rub-y into a list of lists
> (def rub-y-vector (1-many-list rub-y 7))
RUB-Y-VECTOR
(def out (twoway-model-additive rub-y-vector))
"=============="
"grand mean ="
16.51845238095238
"row-effects="
(-13.744166666666665 -12.898452380952378 -11.20130952380952 -9.278452380952377
-7.7070238095238075 -6.6084523809523805 -2.894166666666665 -0.3527380952380952
3.3815476190476232 11.342976190476193 22.778690476190473 27.181547619047617)
"col-effects"
(-3.3367857142857105 -2.220952380952376 -1.1159523809523773 -1.1904761904091288E-4
1.1148809523809575 2.2223809523809592 3.336547619047625)
"==============="
"Sum of squares :"
"for row "
14533.434527380949
"for column"
415.51925714285744
" for error"
436.4265142857166
"total"
15385.380298809523
OUT
You can find residuals by
(def residuals (car (last out)) )